pub struct StoreAccessorProxy { /* private fields */ }
Implementations§
Source§impl StoreAccessorProxy
impl StoreAccessorProxy
Sourcepub fn take_event_stream(&self) -> StoreAccessorEventStream
pub fn take_event_stream(&self) -> StoreAccessorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_value(
&self,
key: &str,
) -> QueryResponseFut<Option<Box<Value>>, DefaultFuchsiaResourceDialect>
pub fn get_value( &self, key: &str, ) -> QueryResponseFut<Option<Box<Value>>, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<StoreAccessorFlushResult, DefaultFuchsiaResourceDialect>
pub fn flush( &self, ) -> QueryResponseFut<StoreAccessorFlushResult, DefaultFuchsiaResourceDialect>
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 Clone for StoreAccessorProxy
impl Clone for StoreAccessorProxy
Source§fn clone(&self) -> StoreAccessorProxy
fn clone(&self) -> StoreAccessorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StoreAccessorProxy
impl Debug for StoreAccessorProxy
Source§impl Proxy for StoreAccessorProxy
impl Proxy for StoreAccessorProxy
Source§type Protocol = StoreAccessorMarker
type Protocol = StoreAccessorMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl StoreAccessorProxyInterface for StoreAccessorProxy
impl StoreAccessorProxyInterface for StoreAccessorProxy
type GetValueResponseFut = QueryResponseFut<Option<Box<Value>>>
type FlushResponseFut = QueryResponseFut<Result<(), FlushError>>
fn get_value(&self, key: &str) -> Self::GetValueResponseFut
fn set_value(&self, key: &str, val: Value) -> Result<(), Error>
fn delete_value(&self, key: &str) -> Result<(), Error>
fn list_prefix( &self, prefix: &str, it: ServerEnd<ListIteratorMarker>, ) -> Result<(), Error>
fn get_prefix( &self, prefix: &str, it: ServerEnd<GetIteratorMarker>, ) -> Result<(), Error>
fn delete_prefix(&self, prefix: &str) -> Result<(), Error>
fn commit(&self) -> Result<(), Error>
fn flush(&self) -> Self::FlushResponseFut
Auto Trait Implementations§
impl Freeze for StoreAccessorProxy
impl !RefUnwindSafe for StoreAccessorProxy
impl Send for StoreAccessorProxy
impl Sync for StoreAccessorProxy
impl Unpin for StoreAccessorProxy
impl !UnwindSafe for StoreAccessorProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)