pub struct FiberVersionedState {
pub version: u8,
pub thread: Address,
pub compiled_instruction: Vec<u8>,
pub last_executed: i64,
pub exec_count: u64,
pub priority_fee: u64,
pub lookup_tables: Vec<Address>,
}Expand description
Versioned fiber state. Carries version as the first field so future
migrations have a leading gate, and trailing lookup_tables so v0 message
compilation can attach an ALT union without runtime account churn.
Fields§
§version: u8State version. Currently 1.
thread: AddressThe thread this fiber belongs to
compiled_instruction: Vec<u8>The compiled instruction data
last_executed: i64When this fiber was last executed
exec_count: u64Total number of executions
priority_fee: u64Priority fee in microlamports for compute unit price (0 = no priority fee)
lookup_tables: Vec<Address>Address Lookup Tables consumed by this fiber. Capped at 4 (Solana v0 limit).
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for FiberVersionedState
impl AccountDeserialize for FiberVersionedState
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<FiberVersionedState, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<FiberVersionedState, 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<FiberVersionedState, Error>
fn try_deserialize_unchecked( buf: &mut &[u8], ) -> Result<FiberVersionedState, 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 BorshDeserialize for FiberVersionedState
impl BorshDeserialize for FiberVersionedState
fn deserialize_reader<__R>(
reader: &mut __R,
) -> Result<FiberVersionedState, Error>where
__R: Read,
Source§fn 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.
Source§fn 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,
Source§impl BorshSerialize for FiberVersionedState
impl BorshSerialize for FiberVersionedState
Source§impl Clone for FiberVersionedState
impl Clone for FiberVersionedState
Source§fn clone(&self) -> FiberVersionedState
fn clone(&self) -> FiberVersionedState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FiberVersionedState
impl Debug for FiberVersionedState
Source§impl Discriminator for FiberVersionedState
impl Discriminator for FiberVersionedState
Source§const DISCRIMINATOR: &'static [u8]
const DISCRIMINATOR: &'static [u8]
Discriminator slice. Read more
Source§impl FiberInstructionProcessor for FiberVersionedState
impl FiberInstructionProcessor for FiberVersionedState
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
Source§impl Space for FiberVersionedState
impl Space for FiberVersionedState
const INIT_SPACE: usize
Auto Trait Implementations§
impl Freeze for FiberVersionedState
impl RefUnwindSafe for FiberVersionedState
impl Send for FiberVersionedState
impl Sync for FiberVersionedState
impl Unpin for FiberVersionedState
impl UnsafeUnpin for FiberVersionedState
impl UnwindSafe for FiberVersionedState
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