[−][src]Struct wascc_actor::keyvalue::KeyValueStoreHostBinding
An abstraction around a host runtime capability for a key-value store
Implementations
impl KeyValueStoreHostBinding
[src]
pub fn get(&self, key: &str) -> HandlerResult<Option<String>>
[src]
Obtains a single value from the store
pub fn set(
&self,
key: &str,
value: &str,
expires: Option<u32>
) -> HandlerResult<()>
[src]
&self,
key: &str,
value: &str,
expires: Option<u32>
) -> HandlerResult<()>
Sets a value in the store
pub fn atomic_add(&self, key: &str, value: i32) -> HandlerResult<i32>
[src]
Performs an atomic increment operation
pub fn list_add(&self, key: &str, item: &str) -> HandlerResult<usize>
[src]
Adds an item to a list at the given key
pub fn list_del_item(&self, key: &str, item: &str) -> HandlerResult<usize>
[src]
Removes an item from the list at the given key
pub fn del_key(&self, key: &str) -> HandlerResult<()>
[src]
Removes the data associated with a given key, which can include lists or sets
pub fn list_range(
&self,
key: &str,
start: isize,
stop_inclusive: isize
) -> HandlerResult<Vec<String>>
[src]
&self,
key: &str,
start: isize,
stop_inclusive: isize
) -> HandlerResult<Vec<String>>
Queries a given list-type key for a range of values
pub fn list_clear(&self, key: &str) -> HandlerResult<()>
[src]
Clears a list while leaving the key intact
pub fn set_add(&self, key: &str, value: &str) -> HandlerResult<usize>
[src]
Adds a value to a set at the given key
pub fn set_remove(&self, key: &str, value: &str) -> HandlerResult<usize>
[src]
Removes a value from the given set
pub fn set_union(&self, keys: Vec<String>) -> HandlerResult<Vec<String>>
[src]
Performs a union of sets specified by the list of keys
pub fn set_intersect(&self, keys: Vec<String>) -> HandlerResult<Vec<String>>
[src]
Performs the intersection of sets specified by the given keys
pub fn set_members(&self, key: &str) -> HandlerResult<Vec<String>>
[src]
Returns a list of members belonging to a given set
pub fn exists(&self, key: &str) -> HandlerResult<bool>
[src]
Indicates whether a key exists (not that empty lists/sets may return true for their existence if they were cleared instead of deleted)
Trait Implementations
impl Default for KeyValueStoreHostBinding
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyValueStoreHostBinding
impl Send for KeyValueStoreHostBinding
impl Sync for KeyValueStoreHostBinding
impl Unpin for KeyValueStoreHostBinding
impl UnwindSafe for KeyValueStoreHostBinding
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,