pub enum Identifier {
Self_(Self_),
Component(Event),
Part(String),
// some variants omitted
}
Expand description
Identifier
identifies a principal.
Variants§
Self_(Self_)
Represents the principal sending the claim. This is useful for a runner to claim a resource that is also shared with one of its children.
Component(Event)
Token identifying the component instance run by this principal.
This is the token defined in the component_instance field of fuchsia.component.runner.ComponentStartInfo.
Part(String)
A subpart of a component, which isn’t a fully-blown Component within Component Framework but still represents a coherent unit of computation. This can be, for instance, a Linux process under Starnix.
This name needs to be unique within the component this principal is part of.
Implementations§
source§impl Identifier
impl Identifier
pub fn ordinal(&self) -> u64
pub fn unknown_variant_for_testing() -> Self
pub fn is_unknown(&self) -> bool
Trait Implementations§
source§impl Debug for Identifier
impl Debug for Identifier
source§impl Decode<Identifier> for Identifier
impl Decode<Identifier> for Identifier
source§impl Encode<Identifier> for &mut Identifier
impl Encode<Identifier> for &mut Identifier
source§impl PartialEq for Identifier
impl PartialEq for Identifier
source§impl ResourceTypeMarker for Identifier
impl ResourceTypeMarker for Identifier
§type Borrowed<'a> = &'a mut Identifier
type Borrowed<'a> = &'a mut Identifier
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moresource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned ) -> Self::Borrowed<'a>
Cheaply converts from
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).source§impl TypeMarker for Identifier
impl TypeMarker for Identifier
§type Owned = Identifier
type Owned = Identifier
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.impl Standalone for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
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