pub struct VecSet<K: MoveType> {
pub contents: MoveVec<K>,
}
Expand description
A set data structure backed by a vector. The set is guaranteed not to contain duplicate keys. All operations are O(N) in the size of the set
- the intention of this data structure is only to provide the convenience of programming against a set API. Sets that need sorted iteration rather than insertion order iteration should be handwritten.
Fields§
§contents: MoveVec<K>
Implementations§
Source§impl<K: MoveType> VecSet<K>
impl<K: MoveType> VecSet<K>
pub fn move_instance(self, k: <K as MoveType>::TypeTag) -> MoveInstance<Self>
pub fn type_(k: <K as MoveType>::TypeTag) -> VecSetTypeTag<K>
Trait Implementations§
Source§impl<'de, K: MoveType> Deserialize<'de> for VecSet<K>
impl<'de, K: MoveType> Deserialize<'de> for VecSet<K>
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<K: MoveType> MoveStruct for VecSet<K>
impl<K: MoveType> MoveStruct for VecSet<K>
type StructTag = VecSetTypeTag<K>
Source§impl<K: MoveType> MoveType for VecSet<K>
impl<K: MoveType> MoveType for VecSet<K>
Source§impl<K: MoveType> StaticModule for VecSet<K>
impl<K: MoveType> StaticModule for VecSet<K>
fn module() -> Identifier
Source§impl<K: MoveType> StaticName for VecSet<K>
impl<K: MoveType> StaticName for VecSet<K>
fn name() -> Identifier
Source§impl<K: MoveType + StaticTypeTag> StaticTypeParams for VecSet<K>
impl<K: MoveType + StaticTypeTag> StaticTypeParams for VecSet<K>
fn type_params() -> Vec<TypeTag>
impl<K: Eq + MoveType> Eq for VecSet<K>
impl<K: MoveType> StructuralPartialEq for VecSet<K>
Auto Trait Implementations§
impl<K> Freeze for VecSet<K>
impl<K> RefUnwindSafe for VecSet<K>where
K: RefUnwindSafe,
impl<K> Send for VecSet<K>where
K: Send,
impl<K> Sync for VecSet<K>where
K: Sync,
impl<K> Unpin for VecSet<K>where
K: Unpin,
impl<K> UnwindSafe for VecSet<K>where
K: 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
Mutably borrows from an owned value. Read more
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