Enum anchor_lang::idl::IdlInstruction
source · [−]pub enum IdlInstruction {
Create {
data_len: u64,
},
Write {
data: Vec<u8>,
},
Clear,
SetAuthority {
new_authority: Pubkey,
},
}
Variants
Create
Fields
data_len: u64
Write
Clear
SetAuthority
Fields
Trait Implementations
sourceimpl BorshDeserialize for IdlInstruction where
u64: BorshDeserialize,
Vec<u8>: BorshDeserialize,
Pubkey: BorshDeserialize,
impl BorshDeserialize for IdlInstruction where
u64: BorshDeserialize,
Vec<u8>: BorshDeserialize,
Pubkey: BorshDeserialize,
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. Read more
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.
sourcefn is_u8() -> bool
fn is_u8() -> bool
Whether Self is u8.
NOTE: Vec<u8>
is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8>
implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details. Read more
sourceimpl BorshSerialize for IdlInstruction where
u64: BorshSerialize,
Vec<u8>: BorshSerialize,
Pubkey: BorshSerialize,
impl BorshSerialize for IdlInstruction where
u64: BorshSerialize,
Vec<u8>: BorshSerialize,
Pubkey: BorshSerialize,
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>
sourcefn try_to_vec(&self) -> Result<Vec<u8, Global>, Error>
fn try_to_vec(&self) -> Result<Vec<u8, Global>, Error>
Serialize this instance into a vector of bytes.
sourcefn is_u8() -> bool
fn is_u8() -> bool
Whether Self is u8.
NOTE: Vec<u8>
is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8>
implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details. Read more
Auto Trait Implementations
impl RefUnwindSafe for IdlInstruction
impl Send for IdlInstruction
impl Sync for IdlInstruction
impl Unpin for IdlInstruction
impl UnwindSafe for IdlInstruction
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more