pub enum StoreRequest {
WriteItem {
payload: StoreWriteItemRequest,
responder: StoreWriteItemResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: StoreControlHandle,
method_type: MethodType,
},
}
Expand description
A very basic key-value store.
Variants§
WriteItem
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.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: StoreControlHandle
§
method_type: MethodType
Implementations§
Source§impl StoreRequest
impl StoreRequest
pub fn into_write_item( self, ) -> Option<(StoreWriteItemRequest, StoreWriteItemResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StoreRequest
impl !RefUnwindSafe for StoreRequest
impl Send for StoreRequest
impl Sync for StoreRequest
impl Unpin for StoreRequest
impl !UnwindSafe for StoreRequest
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
Mutably borrows from an owned value. Read more