pub struct DictionarySynchronousProxy { /* private fields */ }
Implementations§
source§impl DictionarySynchronousProxy
impl DictionarySynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<DictionaryEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<DictionaryEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn insert(
&self,
key: &str,
value: Capability,
___deadline: Time
) -> Result<DictionaryInsertResult, Error>
pub fn insert( &self, key: &str, value: Capability, ___deadline: Time ) -> Result<DictionaryInsertResult, Error>
Inserts a key-value pair into the dictionary.
- error
DictionaryError.ALREADY_EXISTS
if the dictionary already contains an item with the same key.
sourcepub fn get(
&self,
key: &str,
___deadline: Time
) -> Result<DictionaryGetResult, Error>
pub fn get( &self, key: &str, ___deadline: Time ) -> Result<DictionaryGetResult, Error>
Get a clone of a capability from this dictionary.
- error
DictionaryError.NOT_FOUND
if the dictionary does not contain the key.
sourcepub fn remove(
&self,
key: &str,
___deadline: Time
) -> Result<DictionaryRemoveResult, Error>
pub fn remove( &self, key: &str, ___deadline: Time ) -> Result<DictionaryRemoveResult, Error>
Removes a key from the dictionary, returning the Capability
value.
- error
DictionaryError.NOT_FOUND
if the dictionary does not contain the key.
sourcepub fn read(&self, ___deadline: Time) -> Result<Vec<DictionaryItem>, Error>
pub fn read(&self, ___deadline: Time) -> Result<Vec<DictionaryItem>, Error>
Returns all items in this dictionary, sorted by key in natural order.
This operation creates shallow clones of values.
sourcepub fn clone(
&self,
___deadline: Time
) -> Result<ClientEnd<DictionaryMarker>, Error>
pub fn clone( &self, ___deadline: Time ) -> Result<ClientEnd<DictionaryMarker>, Error>
Creates a new connection to the same underlying dictionary.
Use Copy
to a new dictionary with clones of all the exiting entries.
sourcepub fn copy(
&self,
___deadline: Time
) -> Result<ClientEnd<DictionaryMarker>, Error>
pub fn copy( &self, ___deadline: Time ) -> Result<ClientEnd<DictionaryMarker>, Error>
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.
sourcepub fn enumerate(
&self,
contents: ServerEnd<DictionaryIteratorMarker>
) -> Result<(), Error>
pub fn enumerate( &self, contents: ServerEnd<DictionaryIteratorMarker> ) -> Result<(), Error>
Enumerates the entries in this dictionary.
Creates a clone of each item during enumeration.
Trait Implementations§
source§impl Debug for DictionarySynchronousProxy
impl Debug for DictionarySynchronousProxy
source§impl SynchronousProxy for DictionarySynchronousProxy
impl SynchronousProxy for DictionarySynchronousProxy
§type Proxy = DictionaryProxy
type Proxy = DictionaryProxy
§type Protocol = DictionaryMarker
type Protocol = DictionaryMarker
Proxy
controls.