pub struct Ref { /* private fields */ }
Expand description
The source or destination of a capability route.
Implementations§
Source§impl Ref
impl Ref
pub fn capability(name: impl Into<String>) -> Ref
pub fn child(name: impl Into<String>) -> Ref
pub fn collection(name: impl Into<String>) -> Ref
pub fn debug() -> Ref
pub fn framework() -> Ref
pub fn parent() -> Ref
pub fn self_() -> Ref
pub fn void() -> Ref
Sourcepub fn dictionary(base: impl Into<Ref>, remainder: impl Into<String>) -> Ref
pub fn dictionary(base: impl Into<Ref>, remainder: impl Into<String>) -> Ref
A reference to a dictionary, possibly nested.
base
represents the first segment of the dictionary path, and remainder
captures the
rest of the path. base
is a Ref
so it is compatible with Ref
objects returned by
previous RealmBuilder API calls. For example, if you had “parent/diagnostics” in CML,
base
would be Ref::parent()
and remainder
is "diagnostics"
.
Sourcepub fn into_fidl(self, ctx: RefContext) -> (Ref, Option<String>)
pub fn into_fidl(self, ctx: RefContext) -> (Ref, Option<String>)
Converts this Ref
to a fidl Ref
, and a dictionary path if the Ref
is Dictionary
.
Trait Implementations§
Source§impl From<&CollectionRef> for Ref
impl From<&CollectionRef> for Ref
Source§fn from(input: &CollectionRef) -> Ref
fn from(input: &CollectionRef) -> Ref
Converts to this type from the input type.
Source§impl From<&SubRealmBuilder> for Ref
A SubRealmBuilder may be referenced as a child in a route, in order to route a capability to or
from the sub realm.
impl From<&SubRealmBuilder> for Ref
A SubRealmBuilder may be referenced as a child in a route, in order to route a capability to or from the sub realm.
Source§fn from(input: &SubRealmBuilder) -> Ref
fn from(input: &SubRealmBuilder) -> Ref
Converts to this type from the input type.
impl Eq for Ref
impl StructuralPartialEq for Ref
Auto Trait Implementations§
impl Freeze for Ref
impl RefUnwindSafe for Ref
impl Send for Ref
impl Sync for Ref
impl Unpin for Ref
impl UnwindSafe for Ref
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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