Trait anchor_lang::AnchorDeserialize
source · pub trait AnchorDeserialize: Sized {
// Required method
fn deserialize_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read;
// Provided methods
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error> { ... }
fn try_from_slice(v: &[u8]) -> Result<Self, Error> { ... }
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read { ... }
}
Expand description
Borsh is the default serialization format for instructions and accounts. A data-structure that can be de-serialized from binary format by NBOR.
Required Methods§
Provided Methods§
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
sourcefn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
Object Safety§
This trait is not object safe.