[−][src]Struct wascap_guest::kv::KeyValueStore
An abstraction around a host runtime capability for a key-value store
Methods
impl KeyValueStore
[src]
pub fn get(&self, key: &str) -> Result<(String, bool)>
[src]
Retrieves the value for a given key, returning the value and whether or not it existed.
pub fn set(&self, key: &str, value: &str) -> Result<()>
[src]
Sets the value for a given key
pub fn atomic_add(&self, key: &str, value: i32) -> Result<i32>
[src]
Performs an atomic add operation, returning the new value
pub fn list_add(&self, key: &str, item: &str) -> Result<usize>
[src]
Adds a string value to a list stored within a given key
pub fn del_key(&self, key: &str) -> Result<()>
[src]
Deletes the given key
pub fn list_range(
&self,
key: &str,
start: isize,
stop_inclusive: isize
) -> Result<Vec<String>>
[src]
&self,
key: &str,
start: isize,
stop_inclusive: isize
) -> Result<Vec<String>>
Requests a list of values contained within a given key
Auto Trait Implementations
impl !Sync for KeyValueStore
impl !Send for KeyValueStore
impl Unpin for KeyValueStore
impl !RefUnwindSafe for KeyValueStore
impl !UnwindSafe for KeyValueStore
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,