pub struct Map<V: MoveType> {
pub id: UID,
pub size: u64,
pub counter: u64,
pub root: u64,
pub first: u64,
pub branch_min: u64,
pub branches_merge_max: u64,
pub branch_max: u64,
pub leaf_min: u64,
pub leaves_merge_max: u64,
pub leaf_max: u64,
/* private fields */
}Expand description
Ordered map with u128 type as a key and V type as a value.
Fields§
§id: UIDObject UID for adding dynamic fields that are used as pointers to nodes.
size: u64Number of key-value pairs in the map.
counter: u64Counter for creating another node as a dynamic field.
root: u64Pointer to the root node, which is a branch or a leaf.
first: u64Pointer to first leaf.
branch_min: u64Minimal number of kids in a non-root branch; must satisfy 2 <= branch_min <= branch_max / 2.
branches_merge_max: u64Maximal number of kids in a branch, which is merge of two branches; must satisfy 2 * branch_min <= branches_merge_max <= branch_max.
branch_max: u64Maximal number of kids in a branch.
leaf_min: u64Minimal number of elements in a non-root leaf; must satisfy 2 <= leaf_min <= (leaf_max + 1) / 2.
leaves_merge_max: u64Maximal number of elements in a leaf, which is merge of two leaves; must satisfy 2 * leaf_min - 1 <= leaves_merge_max <= leaf_max.
leaf_max: u64Maximal number of elements in a leaf.
Implementations§
Source§impl<V: MoveType> Map<V>
impl<V: MoveType> Map<V>
pub fn move_instance( self, address: Address, v: <V as MoveType>::TypeTag, ) -> MoveInstance<Self>
pub fn type_(address: Address, v: <V as MoveType>::TypeTag) -> MapTypeTag<V>
Source§impl Map<Order>
impl Map<Order>
Sourcepub fn leaf_df_type(package: Address) -> FieldTypeTag<u64, Leaf<Order>>
pub fn leaf_df_type(package: Address) -> FieldTypeTag<u64, Leaf<Order>>
Convenience function to build the type of an OrderLeafDf.
Trait Implementations§
Source§impl<'de, V: MoveType> Deserialize<'de> for Map<V>
impl<'de, V: MoveType> Deserialize<'de> for Map<V>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<V: MoveType> MoveStruct for Map<V>
impl<V: MoveType> MoveStruct for Map<V>
type StructTag = MapTypeTag<V>
Source§impl<V: MoveType> MoveType for Map<V>
impl<V: MoveType> MoveType for Map<V>
Source§impl<V: MoveType> StaticModule for Map<V>
impl<V: MoveType> StaticModule for Map<V>
fn module() -> Identifier
Source§impl<V: MoveType> StaticName for Map<V>
impl<V: MoveType> StaticName for Map<V>
fn name() -> Identifier
Source§impl<V: MoveType + StaticTypeTag> StaticTypeParams for Map<V>
impl<V: MoveType + StaticTypeTag> StaticTypeParams for Map<V>
fn type_params() -> Vec<TypeTag>
impl<V: Eq + MoveType> Eq for Map<V>
impl<V: MoveType> StructuralPartialEq for Map<V>
Auto Trait Implementations§
impl<V> Freeze for Map<V>
impl<V> RefUnwindSafe for Map<V>where
V: RefUnwindSafe,
impl<V> Send for Map<V>where
V: Send,
impl<V> Sync for Map<V>where
V: Sync,
impl<V> Unpin for Map<V>where
V: Unpin,
impl<V> UnwindSafe for Map<V>where
V: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
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>
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>
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.