#[repr(C)]pub struct VirtualInventory {Show 13 fields
pub version: u8,
pub bump: u8,
pub flags: VirtualInventoryFlagContainer,
pub long_amount_decimals: u8,
pub short_amount_decimals: u8,
pub padding_0: [u8; 3],
pub ref_count: u32,
pub index: u32,
pub padding_1: [u8; 16],
pub store: Pubkey,
pub pool: PoolStorage,
pub buffer: RevertiblePoolBuffer,
pub reserved_0: [u8; 128],
}Expand description
General purpose virtual inventory.
Fields§
§version: u8§bump: u8§flags: VirtualInventoryFlagContainer§long_amount_decimals: u8§short_amount_decimals: u8§padding_0: [u8; 3]§ref_count: u32§index: u32§padding_1: [u8; 16]§store: Pubkey§pool: PoolStorage§buffer: RevertiblePoolBuffer§reserved_0: [u8; 128]Trait Implementations§
Source§impl AccountDeserialize for VirtualInventory
impl AccountDeserialize for VirtualInventory
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
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<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
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 Clone for VirtualInventory
impl Clone for VirtualInventory
Source§fn clone(&self) -> VirtualInventory
fn clone(&self) -> VirtualInventory
Returns a duplicate of the value. Read more
1.0.0 · 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 VirtualInventory
impl Debug for VirtualInventory
Source§impl Default for VirtualInventory
Available on crate features store and utils only.
impl Default for VirtualInventory
Available on crate features
store and utils only.Source§impl Discriminator for VirtualInventory
impl Discriminator for VirtualInventory
Source§const DISCRIMINATOR: &'static [u8]
const DISCRIMINATOR: &'static [u8]
Discriminator slice. Read more
impl Copy for VirtualInventory
impl Pod for VirtualInventory
impl ZeroCopy for VirtualInventory
Auto Trait Implementations§
impl Freeze for VirtualInventory
impl RefUnwindSafe for VirtualInventory
impl Send for VirtualInventory
impl Sync for VirtualInventory
impl Unpin for VirtualInventory
impl UnwindSafe for VirtualInventory
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.