pub enum Fiber {
Legacy(FiberState),
V1(FiberVersionedState),
}Expand description
Discriminator-tagged read view over either fiber shape on disk.
Implements AccountDeserialize so callers use the same
try_deserialize(&mut buf) shape as any other Anchor account type — the
trait impl peeks the leading 8-byte discriminator and routes to the
matching state struct’s deserializer.
Variants§
Legacy(FiberState)
V1(FiberVersionedState)
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for Fiber
impl AccountDeserialize for Fiber
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Fiber, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<Fiber, Error>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§impl FiberInstructionProcessor for Fiber
impl FiberInstructionProcessor for Fiber
Source§fn get_instruction(&self, executor: &Address) -> Result<Instruction, Error>
fn get_instruction(&self, executor: &Address) -> Result<Instruction, Error>
Get the decompiled instruction from the fiber’s compiled data,
replacing PAYER_PUBKEY with the provided executor
Auto Trait Implementations§
impl Freeze for Fiber
impl RefUnwindSafe for Fiber
impl Send for Fiber
impl Sync for Fiber
impl Unpin for Fiber
impl UnsafeUnpin for Fiber
impl UnwindSafe for Fiber
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more