pub struct Connector {
pub handle: EventPair,
pub capabilities_proxy: CapabilitiesProxy,
}Expand description
A connector capability can be invoked to send a channel to the creator of the connector.
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 Connector
impl Connector
Sourcepub async fn new() -> (Self, ConnectorReceiver)
pub async fn new() -> (Self, ConnectorReceiver)
Creates a new Connector, connecting to /svc/fuchsia.component.runtime.Capabilities to
do so.
Sourcepub async fn new_with_proxy(
capabilities_proxy: CapabilitiesProxy,
) -> (Self, ConnectorReceiver)
pub async fn new_with_proxy( capabilities_proxy: CapabilitiesProxy, ) -> (Self, ConnectorReceiver)
Creates a new Connector 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 connect(&self, channel: Channel) -> Result<(), CapabilitiesError>
Trait Implementations§
Source§impl From<Connector> for Capability
impl From<Connector> for Capability
Auto Trait Implementations§
impl Freeze for Connector
impl !RefUnwindSafe for Connector
impl Send for Connector
impl Sync for Connector
impl Unpin for Connector
impl !UnwindSafe for Connector
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]