[][src]Struct waxosuit_guest::kv::KeyValueStore

pub struct KeyValueStore {}

An abstraction around a host runtime capability for a key-value store

Methods

impl KeyValueStore[src]

pub fn get(&self, key: &str) -> Result<Option<String>>[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, expires: Option<u32>) -> 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 list_del_item(&self, key: &str, item: &str) -> Result<usize>[src]

Deletes all occurrences of an item in a list

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

pub fn list_clear(&self, key: &str) -> Result<()>[src]

Clears a list

pub fn set_add(&self, key: &str, value: &str) -> Result<usize>[src]

Adds an item to a set

pub fn set_remove(&self, key: &str, value: &str) -> Result<usize>[src]

Removes an item from a set

pub fn set_union<T: AsRef<str>>(&self, keys: &[T]) -> Result<Vec<String>>[src]

Returns the union of sets indicated by list of keys

pub fn set_intersect<T: AsRef<str>>(&self, keys: &[T]) -> Result<Vec<String>>[src]

Returns the intersection of all sets indicated by the list of keys

pub fn set_members(&self, key: &str) -> Result<Vec<String>>[src]

Returns all members of a given set

pub fn exists(&self, key: &str) -> Result<bool>[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Error = !

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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