Skip to main content

Fiber

Enum Fiber 

Source
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§

Implementations§

Source§

impl Fiber

Source

pub fn is_legacy(&self) -> bool

Source

pub fn thread(&self) -> Address

Source

pub fn compiled_instruction(&self) -> &[u8]

Source

pub fn priority_fee(&self) -> u64

Source

pub fn lookup_tables(&self) -> &[Address]

Trait Implementations§

Source§

impl AccountDeserialize for Fiber

Source§

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§

fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Fiber, Error>

Deserializes account data without checking the account discriminator. This should only be used on account initialization, when the bytes of the account are zeroed.
Source§

impl Debug for Fiber

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FiberInstructionProcessor for Fiber

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.