#[repr(C)]pub struct TokenBalances {
pub data: [TokenBalancesEntry; 16],
pub padding: [u8; 4],
pub count: u32,
}Expand description
Fixed size map generated by the macro.
Fields§
§data: [TokenBalancesEntry; 16]§padding: [u8; 4]§count: u32Implementations§
Source§impl TokenBalances
impl TokenBalances
Sourcepub fn get(&self, key: &Pubkey) -> Option<&TokenBalance>
Available on crate features utils and treasury and gmsol-utils only.
pub fn get(&self, key: &Pubkey) -> Option<&TokenBalance>
utils and treasury and gmsol-utils only.Get.
Sourcepub fn get_entry_by_index(
&self,
idx: usize,
) -> Option<(&[u8; 32], &TokenBalance)>
Available on crate features utils and treasury and gmsol-utils only.
pub fn get_entry_by_index( &self, idx: usize, ) -> Option<(&[u8; 32], &TokenBalance)>
utils and treasury and gmsol-utils only.Get entry by index.
Sourcepub fn get_mut(&mut self, key: &Pubkey) -> Option<&mut TokenBalance>
Available on crate features utils and treasury and gmsol-utils only.
pub fn get_mut(&mut self, key: &Pubkey) -> Option<&mut TokenBalance>
utils and treasury and gmsol-utils only.Get mutable reference to the corresponding value.
Sourcepub fn insert(
&mut self,
key: &Pubkey,
value: TokenBalance,
) -> Option<TokenBalance>
Available on crate features utils and treasury and gmsol-utils only.
pub fn insert( &mut self, key: &Pubkey, value: TokenBalance, ) -> Option<TokenBalance>
utils and treasury and gmsol-utils only.Insert.
Sourcepub fn insert_with_options(
&mut self,
key: &Pubkey,
value: TokenBalance,
new: bool,
) -> Result<Option<TokenBalance>, Error>
Available on crate features utils and treasury and gmsol-utils only.
pub fn insert_with_options( &mut self, key: &Pubkey, value: TokenBalance, new: bool, ) -> Result<Option<TokenBalance>, Error>
utils and treasury and gmsol-utils only.Insert with options.
Sourcepub fn remove(&mut self, key: &Pubkey) -> Option<TokenBalance>
Available on crate features utils and treasury and gmsol-utils only.
pub fn remove(&mut self, key: &Pubkey) -> Option<TokenBalance>
utils and treasury and gmsol-utils only.Remove.
Sourcepub fn len(&self) -> usize
Available on crate features utils and treasury and gmsol-utils only.
pub fn len(&self) -> usize
utils and treasury and gmsol-utils only.Get length.
Sourcepub fn is_empty(&self) -> bool
Available on crate features utils and treasury and gmsol-utils only.
pub fn is_empty(&self) -> bool
utils and treasury and gmsol-utils only.Is empty.
Sourcepub fn entries(&self) -> impl Iterator<Item = (&[u8; 32], &TokenBalance)>
Available on crate features utils and treasury and gmsol-utils only.
pub fn entries(&self) -> impl Iterator<Item = (&[u8; 32], &TokenBalance)>
utils and treasury and gmsol-utils only.Entries.
Sourcepub fn entries_mut(
&mut self,
) -> impl Iterator<Item = (&[u8; 32], &mut TokenBalance)>
Available on crate features utils and treasury and gmsol-utils only.
pub fn entries_mut( &mut self, ) -> impl Iterator<Item = (&[u8; 32], &mut TokenBalance)>
utils and treasury and gmsol-utils only.Entries with mutable access.
Trait Implementations§
Source§impl Clone for TokenBalances
impl Clone for TokenBalances
Source§fn clone(&self) -> TokenBalances
fn clone(&self) -> TokenBalances
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 TokenBalances
impl Debug for TokenBalances
Source§impl InitSpace for TokenBalances
Available on crate features gmsol-utils and treasury and utils only.
impl InitSpace for TokenBalances
Available on crate features
gmsol-utils and treasury and utils only.Source§const INIT_SPACE: usize = 1_672usize
const INIT_SPACE: usize = 1_672usize
Init Space.
impl Copy for TokenBalances
impl Pod for TokenBalances
Auto Trait Implementations§
impl Freeze for TokenBalances
impl RefUnwindSafe for TokenBalances
impl Send for TokenBalances
impl Sync for TokenBalances
impl Unpin for TokenBalances
impl UnwindSafe for TokenBalances
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.