Struct near_sdk::collections::UnorderedSet [−][src]
pub struct UnorderedSet<T> { /* fields omitted */ }
Expand description
An iterable implementation of a set that stores its content directly on the trie.
Implementations
Returns the number of elements in the set, also referred to as its size.
Create new map with zero elements. Use id
as a unique identifier.
Adds a value to the set.
If the set did not have this value present, true
is returned.
If the set did have this value present, false
is returned.
Removes a value from the set. Returns whether the value was present in the set.
Adds a value to the set.
If the set did not have this value present, true
is returned.
If the set did have this value present, false
is returned.
Trait Implementations
impl<T> BorshDeserialize for UnorderedSet<T> where
Vec<u8>: BorshDeserialize,
Vector<T>: BorshDeserialize,
impl<T> BorshDeserialize for UnorderedSet<T> where
Vec<u8>: BorshDeserialize,
Vector<T>: BorshDeserialize,
Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more
Deserialize this instance from a slice of bytes.
Whether Self is u8.
NOTE: Vec<u8>
is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8>
implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details. Read more
impl<T> BorshSerialize for UnorderedSet<T> where
Vec<u8>: BorshSerialize,
Vector<T>: BorshSerialize,
impl<T> BorshSerialize for UnorderedSet<T> where
Vec<u8>: BorshSerialize,
Vector<T>: BorshSerialize,
Serialize this instance into a vector of bytes.
Whether Self is u8.
NOTE: Vec<u8>
is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8>
implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for UnorderedSet<T> where
T: RefUnwindSafe,
impl<T> Send for UnorderedSet<T> where
T: Send,
impl<T> Sync for UnorderedSet<T> where
T: Sync,
impl<T> Unpin for UnorderedSet<T> where
T: Unpin,
impl<T> UnwindSafe for UnorderedSet<T> where
T: UnwindSafe,