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.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 StoreProxyInterface for StoreProxy
impl StoreProxyInterface for StoreProxy
type WriteItemResponseFut = QueryResponseFut<Result<Value, WriteError>>
fn write_item( &self, payload: &StoreWriteItemRequest, ) -> Self::WriteItemResponseFut
Auto Trait Implementations§
impl Freeze for StoreProxy
impl !RefUnwindSafe for StoreProxy
impl Send for StoreProxy
impl Sync for StoreProxy
impl Unpin for StoreProxy
impl !UnwindSafe for StoreProxy
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
)