Struct cosmwasm_storage::PrefixedStorage
source · [−]pub struct PrefixedStorage<'a> { /* private fields */ }
Implementations
sourceimpl<'a> PrefixedStorage<'a>
impl<'a> PrefixedStorage<'a>
Trait Implementations
sourceimpl<'a> Storage for PrefixedStorage<'a>
impl<'a> Storage for PrefixedStorage<'a>
sourcefn range<'b>(
&'b self,
start: Option<&[u8]>,
end: Option<&[u8]>,
order: Order
) -> Box<dyn Iterator<Item = Record> + 'b>
fn range<'b>(
&'b self,
start: Option<&[u8]>,
end: Option<&[u8]>,
order: Order
) -> Box<dyn Iterator<Item = Record> + 'b>
range allows iteration over a set of keys, either forwards or backwards uses standard rust range notation, and eg db.range(b“foo“..b“bar“) also works reverse
sourcefn get(&self, key: &[u8]) -> Option<Vec<u8>>
fn get(&self, key: &[u8]) -> Option<Vec<u8>>
Returns None when key does not exist.
Returns Some(Vec
fn set(&mut self, key: &[u8], value: &[u8])
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PrefixedStorage<'a>
impl<'a> !Send for PrefixedStorage<'a>
impl<'a> !Sync for PrefixedStorage<'a>
impl<'a> Unpin for PrefixedStorage<'a>
impl<'a> !UnwindSafe for PrefixedStorage<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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