pub struct ConnectorRouter {
pub handle: EventPair,
pub capabilities_proxy: CapabilitiesProxy,
}Expand description
A connector router may be used to request it produce a Connector 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 ConnectorRouter
impl ConnectorRouter
Sourcepub async fn new() -> (Self, ConnectorRouterReceiver)
pub async fn new() -> (Self, ConnectorRouterReceiver)
Creates a new ConnectorRouter, connecting to
/svc/fuchsia.component.runtime.Capabilities to do so.
Sourcepub async fn new_with_proxy(
capabilities_proxy: CapabilitiesProxy,
) -> (Self, ConnectorRouterReceiver)
pub async fn new_with_proxy( capabilities_proxy: CapabilitiesProxy, ) -> (Self, ConnectorRouterReceiver)
Creates a new ConnectorRouter 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<Connector>, Status>
Trait Implementations§
Source§impl Clone for ConnectorRouter
impl Clone for ConnectorRouter
Source§impl Debug for ConnectorRouter
impl Debug for ConnectorRouter
Source§impl From<ConnectorRouter> for Capability
impl From<ConnectorRouter> for Capability
Source§fn from(val: ConnectorRouter) -> Self
fn from(val: ConnectorRouter) -> Self
Source§impl TryFrom<Capability> for ConnectorRouter
impl TryFrom<Capability> for ConnectorRouter
Auto Trait Implementations§
impl Freeze for ConnectorRouter
impl !RefUnwindSafe for ConnectorRouter
impl Send for ConnectorRouter
impl Sync for ConnectorRouter
impl Unpin for ConnectorRouter
impl !UnwindSafe for ConnectorRouter
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]