Struct cw_storage_plus::UniqueIndex
source · [−]pub struct UniqueIndex<'a, K, T> { /* private fields */ }
Expand description
UniqueIndex stores (namespace, index_name, idx_value) -> {key, value} Allows one value per index (i.e. unique) and copies pk and data
Implementations
sourceimpl<'a, K, T> UniqueIndex<'a, K, T>
impl<'a, K, T> UniqueIndex<'a, K, T>
sourceimpl<'a, K, T> UniqueIndex<'a, K, T> where
T: Serialize + DeserializeOwned + Clone,
K: PrimaryKey<'a>,
impl<'a, K, T> UniqueIndex<'a, K, T> where
T: Serialize + DeserializeOwned + Clone,
K: PrimaryKey<'a>,
sourceimpl<'a, K, T> UniqueIndex<'a, K, T> where
T: Serialize + DeserializeOwned + Clone,
K: PrimaryKey<'a>,
K::SubPrefix: EmptyPrefix,
impl<'a, K, T> UniqueIndex<'a, K, T> where
T: Serialize + DeserializeOwned + Clone,
K: PrimaryKey<'a>,
K::SubPrefix: EmptyPrefix,
pub fn range<'c>(
&self,
store: &'c dyn Storage,
min: Option<Bound>,
max: Option<Bound>,
order: Order
) -> Box<dyn Iterator<Item = StdResult<Pair<T>>> + 'c> where
T: 'c,
pub fn keys<'c>(
&self,
store: &'c dyn Storage,
min: Option<Bound>,
max: Option<Bound>,
order: Order
) -> Box<dyn Iterator<Item = Vec<u8>> + 'c>
Trait Implementations
Auto Trait Implementations
impl<'a, K, T> RefUnwindSafe for UniqueIndex<'a, K, T> where
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, K, T> Send for UniqueIndex<'a, K, T> where
K: Send,
T: Send,
impl<'a, K, T> Sync for UniqueIndex<'a, K, T> where
K: Sync,
T: Sync,
impl<'a, K, T> Unpin for UniqueIndex<'a, K, T> where
K: Unpin,
T: Unpin,
impl<'a, K, T> UnwindSafe for UniqueIndex<'a, K, T> where
K: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more