pub enum StoreAccessorRequest {
GetValue {
key: String,
responder: StoreAccessorGetValueResponder,
},
SetValue {
key: String,
val: Value,
control_handle: StoreAccessorControlHandle,
},
DeleteValue {
key: String,
control_handle: StoreAccessorControlHandle,
},
ListPrefix {
prefix: String,
it: ServerEnd<ListIteratorMarker>,
control_handle: StoreAccessorControlHandle,
},
GetPrefix {
prefix: String,
it: ServerEnd<GetIteratorMarker>,
control_handle: StoreAccessorControlHandle,
},
DeletePrefix {
prefix: String,
control_handle: StoreAccessorControlHandle,
},
Commit {
control_handle: StoreAccessorControlHandle,
},
Flush {
responder: StoreAccessorFlushResponder,
},
}
Expand description
The interface returned when a new accessor is created.
Variants§
GetValue
Gets a single value from the store.
SetValue
Sets a single value in the store. Overwrites existing values. Commit() must be called for this change to take effect.
DeleteValue
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.
ListPrefix
Lists all keys under a given prefix.
GetPrefix
Reads the values of all keys under a given prefix.
DeletePrefix
Deletes the all keys under a given prefix.
Commit
Atomically causes all of the state modifications that happened in this accessor to take place.
Fields
control_handle: StoreAccessorControlHandle
Flush
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.
Fields
responder: StoreAccessorFlushResponder
Implementations§
Source§impl StoreAccessorRequest
impl StoreAccessorRequest
pub fn into_get_value(self) -> Option<(String, StoreAccessorGetValueResponder)>
pub fn into_set_value( self, ) -> Option<(String, Value, StoreAccessorControlHandle)>
pub fn into_delete_value(self) -> Option<(String, StoreAccessorControlHandle)>
pub fn into_list_prefix( self, ) -> Option<(String, ServerEnd<ListIteratorMarker>, StoreAccessorControlHandle)>
pub fn into_get_prefix( self, ) -> Option<(String, ServerEnd<GetIteratorMarker>, StoreAccessorControlHandle)>
pub fn into_delete_prefix(self) -> Option<(String, StoreAccessorControlHandle)>
pub fn into_commit(self) -> Option<StoreAccessorControlHandle>
pub fn into_flush(self) -> Option<StoreAccessorFlushResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL