pub struct DictionaryRouter {
pub handle: EventPair,
pub capabilities_proxy: CapabilitiesProxy,
}Expand description
A dictionary router may be used to request it produce a Dictionary capability. The router
may decide to do so, decline to do so, or return an error, and it may rely on the contents of
the metadata provided when route is called to do so. Routers may also delegate the request
to other routers, often mutating metadata when they do.
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 DictionaryRouter
impl DictionaryRouter
Sourcepub async fn new() -> (Self, DictionaryRouterReceiver)
pub async fn new() -> (Self, DictionaryRouterReceiver)
Creates a new DictionaryRouter, connecting to
/svc/fuchsia.component.runtime.Capabilities to do so.
Sourcepub async fn new_with_proxy(
capabilities_proxy: CapabilitiesProxy,
) -> (Self, DictionaryRouterReceiver)
pub async fn new_with_proxy( capabilities_proxy: CapabilitiesProxy, ) -> (Self, DictionaryRouterReceiver)
Creates a new DictionaryRouter 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 route( &self, request: RouteRequest, instance_token: &InstanceToken, ) -> Result<Option<Dictionary>, Status>
Trait Implementations§
Source§impl Clone for DictionaryRouter
impl Clone for DictionaryRouter
Source§impl Debug for DictionaryRouter
impl Debug for DictionaryRouter
Source§impl From<DictionaryRouter> for Capability
impl From<DictionaryRouter> for Capability
Source§fn from(val: DictionaryRouter) -> Self
fn from(val: DictionaryRouter) -> Self
Source§impl TryFrom<Capability> for DictionaryRouter
impl TryFrom<Capability> for DictionaryRouter
Auto Trait Implementations§
impl Freeze for DictionaryRouter
impl !RefUnwindSafe for DictionaryRouter
impl Send for DictionaryRouter
impl Sync for DictionaryRouter
impl Unpin for DictionaryRouter
impl !UnwindSafe for DictionaryRouter
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
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
T to [Self]