[][src]Struct wascap_guest::kv::KeyValueStore

pub struct KeyValueStore { /* fields omitted */ }

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]

Requests a list of values contained within a given key

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]