pub struct StoreProxy { /* private fields */ }
Implementations§
Source§impl StoreProxy
impl StoreProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for examples.keyvaluestore.usegenericvalues/Store.
Sourcepub fn take_event_stream(&self) -> StoreEventStream
pub fn take_event_stream(&self) -> StoreEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn write_item(
&self,
payload: &StoreWriteItemRequest,
) -> QueryResponseFut<StoreWriteItemResult, DefaultFuchsiaResourceDialect>
pub fn write_item( &self, payload: &StoreWriteItemRequest, ) -> QueryResponseFut<StoreWriteItemResult, DefaultFuchsiaResourceDialect>
Writes an item to the store.
Since the value stored in the key-value store can now be different from the input (if the
WriteOptions.CONCAT
flag is set), we need to return the resulting Value
to the
requester.
We use an (anonymous) table
and a (named) flexible union
as the request and response
payload, respectively, to allow for easier future evolution. Both of these types are
flexible
, meaning that adding or removing members is binary-compatible. This makes them
much easier to evolve that the struct
types that were previously used, which cannot be
changed after release without breaking ABI.
Trait Implementations§
Source§impl Clone for StoreProxy
impl Clone for StoreProxy
Source§fn clone(&self) -> StoreProxy
fn clone(&self) -> StoreProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StoreProxy
impl Debug for StoreProxy
Source§impl Proxy for StoreProxy
impl Proxy for StoreProxy
Source§type Protocol = StoreMarker
type Protocol = StoreMarker
Proxy
controls.