Enum sandbox::Capability

source ·
pub enum Capability {
    Unit(Unit),
    Sender(Sender),
    Open(Open),
    Dictionary(Dict),
    Data(Data),
    Directory(Directory),
    OneShotHandle(OneShotHandle),
    Router(Router),
    Component(WeakComponentToken),
}

Variants§

§

Unit(Unit)

§

Sender(Sender)

§

Open(Open)

§

Dictionary(Dict)

§

Data(Data)

§

Directory(Directory)

§

OneShotHandle(OneShotHandle)

§

Router(Router)

§

Component(WeakComponentToken)

Implementations§

source§

impl Capability

source

pub fn to_dictionary(self) -> Option<Dict>

source

pub fn into_fidl(self) -> Capability

source

pub fn try_into_directory_entry( self ) -> Result<Arc<dyn DirectoryEntry>, ConversionError>

source

pub fn debug_typename(&self) -> &'static str

Trait Implementations§

source§

impl Clone for Capability

source§

fn clone(&self) -> Capability

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Capability

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Capability> for Capability

source§

fn from(capability: Capability) -> Self

Converts to this type from the input type.
source§

impl From<Data> for Capability

source§

fn from(f: Data) -> Self

Converts to this type from the input type.
source§

impl From<Dict> for Capability

source§

fn from(f: Dict) -> Self

Converts to this type from the input type.
source§

impl From<Directory> for Capability

source§

fn from(f: Directory) -> Self

Converts to this type from the input type.
source§

impl From<OneShotHandle> for Capability

source§

fn from(f: OneShotHandle) -> Self

Converts to this type from the input type.
source§

impl From<Open> for Capability

source§

fn from(f: Open) -> Self

Converts to this type from the input type.
source§

impl From<Router> for Capability

source§

fn from(f: Router) -> Self

Converts to this type from the input type.
source§

impl From<Sender> for Capability

source§

fn from(f: Sender) -> Self

Converts to this type from the input type.
source§

impl From<Unit> for Capability

source§

fn from(f: Unit) -> Self

Converts to this type from the input type.
source§

impl From<WeakComponentToken> for Capability

source§

fn from(f: WeakComponentToken) -> Self

Converts to this type from the input type.
source§

impl FromEnum<Capability> for Data

source§

impl FromEnum<Capability> for Dict

source§

impl FromEnum<Capability> for Directory

source§

impl FromEnum<Capability> for OneShotHandle

source§

impl FromEnum<Capability> for Open

source§

impl FromEnum<Capability> for Router

source§

impl FromEnum<Capability> for Sender

source§

impl FromEnum<Capability> for Unit

source§

impl FromEnum<Capability> for WeakComponentToken

source§

impl Routable for Capability

source§

fn route<'life0, 'async_trait>( &'life0 self, request: Request ) -> Pin<Box<dyn Future<Output = Result<Capability, RouterError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl TryFrom<Capability> for Capability

source§

fn try_from(capability: Capability) -> Result<Self, Self::Error>

Converts the FIDL capability back to a Rust Capability.

In most cases, the Capability was previously inserted into the registry when it was converted to a FIDL capability. This method takes it out of the registry.

§

type Error = RemoteError

The type returned in the event of a conversion error.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Encode<Ambiguous1> for T

source§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> Encode<Ambiguous2> for T

source§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Cast the given object into a dyn std::any::Any.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more