pub struct MaxLenBTreeMap<K, V, const N: usize>{ /* private fields */ }Implementations§
Source§impl<K, V, const N: usize> MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> MaxLenBTreeMap<K, V, N>
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn insert(&mut self, key: K, value: V) -> Result<Option<V>, &'static str>
pub fn remove(&mut self, key: &K) -> Option<V>
pub fn get(&self, key: &K) -> Option<&V>
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn contains_key(&self, key: &K) -> bool
pub fn clear(&mut self)
pub fn contents(&self) -> &BTreeMap<K, V>
Trait Implementations§
Source§impl<K, V, const N: usize> BorshDeserialize for MaxLenBTreeMap<K, V, N>where
K: MaxSerializedLen + Clone + Ord + Hash,
V: MaxSerializedLen + Clone,
BTreeMap<K, V>: BorshDeserialize,
impl<K, V, const N: usize> BorshDeserialize for MaxLenBTreeMap<K, V, N>where
K: MaxSerializedLen + Clone + Ord + Hash,
V: MaxSerializedLen + Clone,
BTreeMap<K, V>: BorshDeserialize,
Source§impl<K, V, const N: usize> BorshSerialize for MaxLenBTreeMap<K, V, N>where
K: MaxSerializedLen + Clone + Ord + Hash,
V: MaxSerializedLen + Clone,
BTreeMap<K, V>: BorshSerialize,
impl<K, V, const N: usize> BorshSerialize for MaxLenBTreeMap<K, V, N>where
K: MaxSerializedLen + Clone + Ord + Hash,
V: MaxSerializedLen + Clone,
BTreeMap<K, V>: BorshSerialize,
Source§impl<K, V, const N: usize> Clone for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> Clone for MaxLenBTreeMap<K, V, N>
Source§fn clone(&self) -> MaxLenBTreeMap<K, V, N>
fn clone(&self) -> MaxLenBTreeMap<K, V, N>
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<K, V, const N: usize> Debug for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> Debug for MaxLenBTreeMap<K, V, N>
Source§impl<K, V, const N: usize> Default for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> Default for MaxLenBTreeMap<K, V, N>
Source§impl<K, V, const N: usize> MaxSerializedLen for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> MaxSerializedLen for MaxLenBTreeMap<K, V, N>
const MAX_SERIALIZED_LEN: usize
Auto Trait Implementations§
impl<K, V, const N: usize> Freeze for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> RefUnwindSafe for MaxLenBTreeMap<K, V, N>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V, const N: usize> Send for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> Sync for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> Unpin for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> UnsafeUnpin for MaxLenBTreeMap<K, V, N>
impl<K, V, const N: usize> UnwindSafe for MaxLenBTreeMap<K, V, N>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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