pub struct InstanceToken {
pub handle: EventPair,
}Expand description
An instance token is an opaque identifier tied to a specific component instance. Component manager relies on these internally to identify which component has initiated a given routing operation.
Fields§
§handle: EventPairThe handle that references this capability
Implementations§
Source§impl InstanceToken
impl InstanceToken
Sourcepub async fn new() -> Self
pub async fn new() -> Self
Creates a new InstanceToken, connecting to
/svc/fuchsia.component.runtime.Capabilities to do so. This instance token will be tied to
the component that fuchsia.component.runtime.Capabilities is scoped to (which will
typically be the same component this code is running in).
Sourcepub async fn new_with_proxy(capabilities_proxy: CapabilitiesProxy) -> Self
pub async fn new_with_proxy(capabilities_proxy: CapabilitiesProxy) -> Self
Creates a new InstanceToken using the provided capabilities_proxy.
Trait Implementations§
Source§impl Clone for InstanceToken
impl Clone for InstanceToken
Source§impl Debug for InstanceToken
impl Debug for InstanceToken
Source§impl From<InstanceToken> for Capability
impl From<InstanceToken> for Capability
Source§fn from(val: InstanceToken) -> Self
fn from(val: InstanceToken) -> Self
Converts to this type from the input type.
Source§impl TryFrom<Capability> for InstanceToken
impl TryFrom<Capability> for InstanceToken
Auto Trait Implementations§
impl Freeze for InstanceToken
impl RefUnwindSafe for InstanceToken
impl Send for InstanceToken
impl Sync for InstanceToken
impl Unpin for InstanceToken
impl UnwindSafe for InstanceToken
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]