pub struct DictionaryProxy { /* private fields */ }
Implementations§
Source§impl DictionaryProxy
impl DictionaryProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.component.runtime/Dictionary.
Sourcepub fn take_event_stream(&self) -> DictionaryEventStream
pub fn take_event_stream(&self) -> DictionaryEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
pub fn clone(&self, request: ServerEnd<CloneableMarker>) -> Result<(), Error>
Sourcepub fn insert(&self, key: &str, capability: Capability) -> Result<(), Error>
pub fn insert(&self, key: &str, capability: Capability) -> Result<(), Error>
Inserts a new Capability
into this Dictionary
under the name key
.
Overwrites any existing entry.
The server end associated with the provided client end must be owned by component manager.
Sourcepub fn get(
&self,
key: &str,
) -> QueryResponseFut<Option<Box<Capability>>, DefaultFuchsiaResourceDialect>
pub fn get( &self, key: &str, ) -> QueryResponseFut<Option<Box<Capability>>, DefaultFuchsiaResourceDialect>
Returns a clone of the Capability
named key
in this dictionary, if
that capability both exists and can be cloned.
Sourcepub fn remove(
&self,
key: &str,
) -> QueryResponseFut<Option<Box<Capability>>, DefaultFuchsiaResourceDialect>
pub fn remove( &self, key: &str, ) -> QueryResponseFut<Option<Box<Capability>>, DefaultFuchsiaResourceDialect>
Removes the Capability
named key
from this dictionary and returns
it, if that capability exists.
Sourcepub fn iterate_keys(
&self,
key_iterator: ServerEnd<DictionaryKeyIteratorMarker>,
) -> Result<(), Error>
pub fn iterate_keys( &self, key_iterator: ServerEnd<DictionaryKeyIteratorMarker>, ) -> Result<(), Error>
Opens an iterator which can be used to iterate over the keys of this dictionary.
Sourcepub fn legacy_export(
&self,
) -> QueryResponseFut<DictionaryRef, DefaultFuchsiaResourceDialect>
pub fn legacy_export( &self, ) -> QueryResponseFut<DictionaryRef, DefaultFuchsiaResourceDialect>
Exports this dictionary for use in a
fuchsia.component.Realm/CreateChild
call.
Trait Implementations§
Source§impl Clone for DictionaryProxy
impl Clone for DictionaryProxy
Source§fn clone(&self) -> DictionaryProxy
fn clone(&self) -> DictionaryProxy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DictionaryProxy
impl Debug for DictionaryProxy
Source§impl DictionaryProxyInterface for DictionaryProxy
impl DictionaryProxyInterface for DictionaryProxy
type GetResponseFut = QueryResponseFut<Option<Box<Capability>>>
type RemoveResponseFut = QueryResponseFut<Option<Box<Capability>>>
type LegacyExportResponseFut = QueryResponseFut<DictionaryRef>
fn clone(&self, request: ServerEnd<CloneableMarker>) -> Result<(), Error>
fn insert(&self, key: &str, capability: Capability) -> Result<(), Error>
fn get(&self, key: &str) -> Self::GetResponseFut
fn remove(&self, key: &str) -> Self::RemoveResponseFut
fn iterate_keys( &self, key_iterator: ServerEnd<DictionaryKeyIteratorMarker>, ) -> Result<(), Error>
fn legacy_export(&self) -> Self::LegacyExportResponseFut
Source§impl Proxy for DictionaryProxy
impl Proxy for DictionaryProxy
Source§type Protocol = DictionaryMarker
type Protocol = DictionaryMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl Freeze for DictionaryProxy
impl !RefUnwindSafe for DictionaryProxy
impl Send for DictionaryProxy
impl Sync for DictionaryProxy
impl Unpin for DictionaryProxy
impl !UnwindSafe for DictionaryProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> FromClient for Twhere
T: Proxy,
impl<T> FromClient for Twhere
T: Proxy,
§fn from_client(value: ClientEnd<<T as FromClient>::Protocol>) -> T
fn from_client(value: ClientEnd<<T as FromClient>::Protocol>) -> T
Converts from a client.