#[repr(C)]pub struct GlvMarkets { /* private fields */ }
Expand description
Fixed size map generated by the macro.
Implementations§
Source§impl GlvMarkets
impl GlvMarkets
Sourcepub fn get(&self, key: &Pubkey) -> Option<&GlvMarketConfig>
pub fn get(&self, key: &Pubkey) -> Option<&GlvMarketConfig>
Get.
Sourcepub fn get_entry_by_index(
&self,
idx: usize,
) -> Option<(&[u8; 32], &GlvMarketConfig)>
pub fn get_entry_by_index( &self, idx: usize, ) -> Option<(&[u8; 32], &GlvMarketConfig)>
Get entry by index.
Sourcepub fn get_mut(&mut self, key: &Pubkey) -> Option<&mut GlvMarketConfig>
pub fn get_mut(&mut self, key: &Pubkey) -> Option<&mut GlvMarketConfig>
Get mutable reference to the corresponding value.
Sourcepub fn insert(
&mut self,
key: &Pubkey,
value: GlvMarketConfig,
) -> Option<GlvMarketConfig>
pub fn insert( &mut self, key: &Pubkey, value: GlvMarketConfig, ) -> Option<GlvMarketConfig>
Insert.
Sourcepub fn insert_with_options(
&mut self,
key: &Pubkey,
value: GlvMarketConfig,
new: bool,
) -> Result<Option<GlvMarketConfig>, Error>
pub fn insert_with_options( &mut self, key: &Pubkey, value: GlvMarketConfig, new: bool, ) -> Result<Option<GlvMarketConfig>, Error>
Insert with options.
Sourcepub fn remove(&mut self, key: &Pubkey) -> Option<GlvMarketConfig>
pub fn remove(&mut self, key: &Pubkey) -> Option<GlvMarketConfig>
Remove.
Sourcepub fn entries_mut(
&mut self,
) -> impl Iterator<Item = (&[u8; 32], &mut GlvMarketConfig)>
pub fn entries_mut( &mut self, ) -> impl Iterator<Item = (&[u8; 32], &mut GlvMarketConfig)>
Entries with mutable access.
Trait Implementations§
Source§impl Clone for GlvMarkets
impl Clone for GlvMarkets
Source§fn clone(&self) -> GlvMarkets
fn clone(&self) -> GlvMarkets
Returns a copy 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 GlvMarkets
impl Debug for GlvMarkets
Source§impl Default for GlvMarkets
impl Default for GlvMarkets
Source§impl InitSpace for GlvMarkets
impl InitSpace for GlvMarkets
Source§const INIT_SPACE: usize = 7_696usize
const INIT_SPACE: usize = 7_696usize
Init Space.
impl Copy for GlvMarkets
impl Pod for GlvMarkets
Auto Trait Implementations§
impl Freeze for GlvMarkets
impl RefUnwindSafe for GlvMarkets
impl Send for GlvMarkets
impl Sync for GlvMarkets
impl Unpin for GlvMarkets
impl UnwindSafe for GlvMarkets
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§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
.§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
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more