pub struct Dictionary {
pub handle: EventPair,
pub capabilities_proxy: CapabilitiesProxy,
}Expand description
A dictionary is a key-value mapping of names to other capabilities.
Fields§
§handle: EventPairThe handle that references this capability
capabilities_proxy: CapabilitiesProxyThe proxy used to create this capability, and the proxy which will be used to perform operations on this capability.
Implementations§
Source§impl Dictionary
impl Dictionary
Sourcepub async fn new() -> Self
pub async fn new() -> Self
Creates a new Dictionary, connecting to /svc/fuchsia.component.runtime.Capabilities
to do so.
Sourcepub async fn new_with_proxy(capabilities_proxy: CapabilitiesProxy) -> Self
pub async fn new_with_proxy(capabilities_proxy: CapabilitiesProxy) -> Self
Creates a new Dictionary using the provided capabilities_proxy.
Sourcepub async fn associate_with_handle(&self, other_handle: EventPair)
pub async fn associate_with_handle(&self, other_handle: EventPair)
Associates other_handle with the same object referenced by this capability, so that
whoever holds the other end of other_handle can refer to our capability.
pub async fn insert(&self, key: &str, value: impl Into<Capability>)
pub async fn get(&self, key: &str) -> Option<Capability>
pub async fn remove(&self, key: &str) -> Option<Capability>
pub async fn keys(&self) -> DictionaryKeysStream
Trait Implementations§
Source§impl Clone for Dictionary
impl Clone for Dictionary
Source§impl Debug for Dictionary
impl Debug for Dictionary
Source§impl From<Dictionary> for Capability
impl From<Dictionary> for Capability
Source§fn from(val: Dictionary) -> Self
fn from(val: Dictionary) -> Self
Converts to this type from the input type.
Source§impl TryFrom<Capability> for Dictionary
impl TryFrom<Capability> for Dictionary
Auto Trait Implementations§
impl Freeze for Dictionary
impl !RefUnwindSafe for Dictionary
impl Send for Dictionary
impl Sync for Dictionary
impl Unpin for Dictionary
impl !UnwindSafe for Dictionary
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,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]