pub struct PrefixedStorage<'a> { /* private fields */ }
👎Deprecated: The crate cosmwasm-storage is unmaintained and will be removed in CosmWasm 2.0. Please consider migrating to cw-storage-plus or simple cosmwasm-std storage calls.
Implementations§
Trait Implementations§
Source§impl<'a> Storage for PrefixedStorage<'a>
impl<'a> Storage for PrefixedStorage<'a>
Source§fn 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
Source§fn 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) when key exists. Read more
fn set(&mut self, key: &[u8], value: &[u8])
Auto Trait Implementations§
impl<'a> Freeze for PrefixedStorage<'a>
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§
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