pub struct ComponentInput(/* private fields */);Expand description
Contains the capabilities component receives from its parent and environment. Stored as a Dictionary containing two nested Dictionarys for the parent and environment.
Implementations§
Source§impl ComponentInput
impl ComponentInput
pub fn new(environment: ComponentEnvironment) -> Self
Sourcepub fn shallow_copy(&self) -> Self
pub fn shallow_copy(&self) -> Self
Creates a new ComponentInput with entries cloned from this ComponentInput.
This is a shallow copy. Values are cloned, not copied, so are new references to the same underlying data.
Sourcepub fn capabilities(&self) -> Dictionary
pub fn capabilities(&self) -> Dictionary
Returns the sub-dictionary containing capabilities routed by the component’s parent.
Sourcepub fn environment(&self) -> ComponentEnvironment
pub fn environment(&self) -> ComponentEnvironment
Returns the sub-dictionary containing capabilities routed by the component’s environment.
pub fn insert_capability( &self, path: &impl IterablePath, capability: Capability, ) -> Option<Capability>
Trait Implementations§
Source§impl Clone for ComponentInput
impl Clone for ComponentInput
Source§fn clone(&self) -> ComponentInput
fn clone(&self) -> ComponentInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComponentInput
impl Debug for ComponentInput
Source§impl Default for ComponentInput
impl Default for ComponentInput
Source§impl From<ComponentInput> for Dictionary
impl From<ComponentInput> for Dictionary
Source§fn from(e: ComponentInput) -> Self
fn from(e: ComponentInput) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ComponentInput
impl !RefUnwindSafe for ComponentInput
impl Send for ComponentInput
impl Sync for ComponentInput
impl Unpin for ComponentInput
impl UnsafeUnpin for ComponentInput
impl !UnwindSafe for ComponentInput
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,
Source§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more