Struct wasmcloud_actor_keyvalue::Host[][src]

pub struct Host { /* fields omitted */ }

Implementations

impl Host[src]

pub fn get(&self, key: String) -> HandlerResult<GetResponse>[src]

Gets a value for a specified key. If the key doesn’t exist, this function will not panic, instead the response type will indicate that it does not exist.

pub fn add(&self, key: String, value: i32) -> HandlerResult<AddResponse>[src]

Add a given numeric value to a key

pub fn set(
    &self,
    key: String,
    value: String,
    expires: i32
) -> HandlerResult<SetResponse>
[src]

Sets the string value of a key

pub fn del(&self, key: String) -> HandlerResult<DelResponse>[src]

Delete a key

pub fn clear(&self, key: String) -> HandlerResult<DelResponse>[src]

Clear a list of its values. Depending on the provider implementation, this may delete the list entirely

pub fn range(
    &self,
    key: String,
    start: i32,
    stop: i32
) -> HandlerResult<ListRangeResponse>
[src]

Retrieve a range of values from a list. Depending on the provider implementation, start and stop may or may not be inclusive.

pub fn push(&self, key: String, value: String) -> HandlerResult<ListResponse>[src]

Push a value onto a list

pub fn list_item_delete(
    &self,
    key: String,
    value: String
) -> HandlerResult<ListResponse>
[src]

Delete an item from a list

pub fn set_add(
    &self,
    key: String,
    value: String
) -> HandlerResult<SetOperationResponse>
[src]

Add an item into a set

pub fn set_remove(
    &self,
    key: String,
    value: String
) -> HandlerResult<SetOperationResponse>
[src]

Remove an item from a set

pub fn set_union(&self, keys: Vec<String>) -> HandlerResult<SetQueryResponse>[src]

Perform and return a set union on a given list of keys

pub fn set_intersection(
    &self,
    keys: Vec<String>
) -> HandlerResult<SetQueryResponse>
[src]

Perform and return a set intersect on a given list of keys

pub fn set_query(&self, key: String) -> HandlerResult<SetQueryResponse>[src]

Retrieve a list of items stored in a set

pub fn key_exists(&self, key: String) -> HandlerResult<GetResponse>[src]

Indicates if a key exists

Trait Implementations

impl Default for Host[src]

Auto Trait Implementations

impl RefUnwindSafe for Host

impl Send for Host

impl Sync for Host

impl Unpin for Host

impl UnwindSafe for Host

Blanket Implementations

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

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

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

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 = 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.