pub enum DictionaryRequest {
Insert {
key: String,
value: Capability,
responder: DictionaryInsertResponder,
},
Get {
key: String,
responder: DictionaryGetResponder,
},
Remove {
key: String,
responder: DictionaryRemoveResponder,
},
Read {
responder: DictionaryReadResponder,
},
Clone {
responder: DictionaryCloneResponder,
},
Copy {
responder: DictionaryCopyResponder,
},
Enumerate {
contents: ServerEnd<DictionaryIteratorMarker>,
control_handle: DictionaryControlHandle,
},
Drain {
contents: Option<ServerEnd<DictionaryIteratorMarker>>,
control_handle: DictionaryControlHandle,
},
_UnknownMethod {
ordinal: u64,
control_handle: DictionaryControlHandle,
method_type: MethodType,
},
}
Variants§
Insert
Inserts a key-value pair into the dictionary.
- error
DictionaryError.ALREADY_EXISTS
if the dictionary already contains an item with the same key.
Get
Get a clone of a capability from this dictionary.
- error
DictionaryError.NOT_FOUND
if the dictionary does not contain the key.
Remove
Removes a key from the dictionary, returning the Capability
value.
- error
DictionaryError.NOT_FOUND
if the dictionary does not contain the key.
Read
Returns all items in this dictionary, sorted by key in natural order.
This operation creates shallow clones of values.
Fields
responder: DictionaryReadResponder
Clone
Creates a new connection to the same underlying dictionary.
Use Copy
to a new dictionary with clones of all the exiting entries.
Fields
responder: DictionaryCloneResponder
Copy
Create a new dictionary that contains a clone of all the entries in this dictionary.
For example, if this dictionary contains nested dictionaries, the newly created dictionary will contain references to those same nested dictionaries because the entries are cloned rather than copied.
Fields
responder: DictionaryCopyResponder
Enumerate
Enumerates the entries in this dictionary.
Creates a clone of each item during enumeration.
Drain
Removes all the entries in this dictionary.
If contents
is not provided, all the items are discarded without
enumerating them.
Fields
contents: Option<ServerEnd<DictionaryIteratorMarker>>
control_handle: DictionaryControlHandle
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: DictionaryControlHandle
method_type: MethodType
Implementations§
source§impl DictionaryRequest
impl DictionaryRequest
pub fn into_insert( self ) -> Option<(String, Capability, DictionaryInsertResponder)>
pub fn into_get(self) -> Option<(String, DictionaryGetResponder)>
pub fn into_remove(self) -> Option<(String, DictionaryRemoveResponder)>
pub fn into_read(self) -> Option<DictionaryReadResponder>
pub fn into_clone(self) -> Option<DictionaryCloneResponder>
pub fn into_copy(self) -> Option<DictionaryCopyResponder>
pub fn into_enumerate( self ) -> Option<(ServerEnd<DictionaryIteratorMarker>, DictionaryControlHandle)>
pub fn into_drain( self ) -> Option<(Option<ServerEnd<DictionaryIteratorMarker>>, DictionaryControlHandle)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL