pub struct StoreAccessorSynchronousProxy { /* private fields */ }
Implementations§
Source§impl StoreAccessorSynchronousProxy
impl StoreAccessorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<StoreAccessorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<StoreAccessorEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_value(
&self,
key: &str,
___deadline: MonotonicInstant,
) -> Result<Option<Box<Value>>, Error>
pub fn get_value( &self, key: &str, ___deadline: MonotonicInstant, ) -> Result<Option<Box<Value>>, Error>
Gets a single value from the store.
Sourcepub fn set_value(&self, key: &str, val: Value) -> Result<(), Error>
pub fn set_value(&self, key: &str, val: Value) -> Result<(), Error>
Sets a single value in the store. Overwrites existing values. Commit() must be called for this change to take effect.
Sourcepub fn delete_value(&self, key: &str) -> Result<(), Error>
pub fn delete_value(&self, key: &str) -> Result<(), Error>
Deletes a single value in the store. Does nothing if the value doesn’t exist. Commit() must be called for this change to take effect.
Sourcepub fn list_prefix(
&self,
prefix: &str,
it: ServerEnd<ListIteratorMarker>,
) -> Result<(), Error>
pub fn list_prefix( &self, prefix: &str, it: ServerEnd<ListIteratorMarker>, ) -> Result<(), Error>
Lists all keys under a given prefix.
Sourcepub fn get_prefix(
&self,
prefix: &str,
it: ServerEnd<GetIteratorMarker>,
) -> Result<(), Error>
pub fn get_prefix( &self, prefix: &str, it: ServerEnd<GetIteratorMarker>, ) -> Result<(), Error>
Reads the values of all keys under a given prefix.
Sourcepub fn delete_prefix(&self, prefix: &str) -> Result<(), Error>
pub fn delete_prefix(&self, prefix: &str) -> Result<(), Error>
Deletes the all keys under a given prefix.
Sourcepub fn commit(&self) -> Result<(), Error>
pub fn commit(&self) -> Result<(), Error>
Atomically causes all of the state modifications that happened in this accessor to take place.
Sourcepub fn flush(
&self,
___deadline: MonotonicInstant,
) -> Result<StoreAccessorFlushResult, Error>
pub fn flush( &self, ___deadline: MonotonicInstant, ) -> Result<StoreAccessorFlushResult, Error>
Atomically causes all of the state modifications that happened in this accessor to take place, returning only when those modifications were written to disk. This operation is equivalent to Commit. Returns a FlushError if this operations could not be committed.
Trait Implementations§
Source§impl SynchronousProxy for StoreAccessorSynchronousProxy
impl SynchronousProxy for StoreAccessorSynchronousProxy
Source§type Proxy = StoreAccessorProxy
type Proxy = StoreAccessorProxy
Source§type Protocol = StoreAccessorMarker
type Protocol = StoreAccessorMarker
Proxy
controls.