pub struct Set<'a, T> { /* private fields */ }Expand description
A set of non-duplicate items.
On a high level, a Set<T> is equivalent to a Map<T, Empty>, but offers
a more intuitive API similar to native HashSet and BTreeSet.
Implementations§
Source§impl<'a, T> Set<'a, T>where
T: PrimaryKey<'a> + KeyDeserialize,
impl<'a, T> Set<'a, T>where
T: PrimaryKey<'a> + KeyDeserialize,
Source§impl<'a, T> Set<'a, T>where
T: PrimaryKey<'a> + KeyDeserialize,
impl<'a, T> Set<'a, T>where
T: PrimaryKey<'a> + KeyDeserialize,
Sourcepub fn prefix(&self, p: T::Prefix) -> Prefix<T::Suffix, Empty, T::Suffix>
pub fn prefix(&self, p: T::Prefix) -> Prefix<T::Suffix, Empty, T::Suffix>
Access items in the set under the given prefix.\
Copied from cw-storage-plus: https://github.com/CosmWasm/cw-plus/blob/v0.14.0/packages/storage-plus/src/map.rs#L124-126
Auto Trait Implementations§
impl<'a, T> Freeze for Set<'a, T>
impl<'a, T> RefUnwindSafe for Set<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Set<'a, T>where
T: Send,
impl<'a, T> Sync for Set<'a, T>where
T: Sync,
impl<'a, T> Unpin for Set<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Set<'a, T>where
T: 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> 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