pub struct Map<'a, 'ctx> { /* private fields */ }Expand description
Read-write access to a raw-byte KV map, from WriteContext::map.
Writes are visible to later reads in the same transaction, and are applied only if the response status is 2xx.
Implementations§
Source§impl Map<'_, '_>
impl Map<'_, '_>
Sourcepub fn get(&mut self, key: &[u8]) -> BridgeResult<Option<Vec<u8>>>
pub fn get(&mut self, key: &[u8]) -> BridgeResult<Option<Vec<u8>>>
Copy the value of key, or None if it is absent.
Sourcepub fn has(&mut self, key: &[u8]) -> BridgeResult<bool>
pub fn has(&mut self, key: &[u8]) -> BridgeResult<bool>
Check whether key is present.
Sourcepub fn remove(&mut self, key: &[u8]) -> BridgeResult<()>
pub fn remove(&mut self, key: &[u8]) -> BridgeResult<()>
Remove key, if it is present.
Auto Trait Implementations§
impl<'a, 'ctx> Freeze for Map<'a, 'ctx>
impl<'a, 'ctx> RefUnwindSafe for Map<'a, 'ctx>
impl<'a, 'ctx> !Send for Map<'a, 'ctx>
impl<'a, 'ctx> !Sync for Map<'a, 'ctx>
impl<'a, 'ctx> Unpin for Map<'a, 'ctx>
impl<'a, 'ctx> UnsafeUnpin for Map<'a, 'ctx>
impl<'a, 'ctx> !UnwindSafe for Map<'a, 'ctx>
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