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