pub struct Moniker { /* private fields */ }
Expand description
Moniker describes the identity of a component instance in terms of its path relative to the root of the component instance tree.
Display notation: “.”, “name1”, “name1/name2”, …
Implementations§
Source§impl Moniker
impl Moniker
pub fn new(path: Vec<ChildName>) -> Self
pub fn path(&self) -> &Vec<ChildName>
pub fn path_mut(&mut self) -> &mut Vec<ChildName>
pub fn parse<T: AsRef<str>>(path: &[T]) -> Result<Self, MonikerError>
pub fn parse_str(input: &str) -> Result<Self, MonikerError>
Sourcepub fn has_prefix(&self, prefix: &Moniker) -> bool
pub fn has_prefix(&self, prefix: &Moniker) -> bool
Indicates whether this moniker is prefixed by prefix.
pub fn root() -> Self
pub fn leaf(&self) -> Option<&ChildName>
pub fn is_root(&self) -> bool
pub fn parent(&self) -> Option<Self>
pub fn child(&self, child: ChildName) -> Self
pub fn next(&mut self) -> Option<ChildName>
Sourcepub fn strip_prefix(&self, prefix: &Moniker) -> Result<Self, MonikerError>
pub fn strip_prefix(&self, prefix: &Moniker) -> Result<Self, MonikerError>
Strips the moniker parts in prefix from the beginning of this moniker.
Trait Implementations§
Source§impl FidlIntoNative<Moniker> for String
impl FidlIntoNative<Moniker> for String
fn fidl_into_native(self) -> Moniker
Source§impl From<Moniker> for ExtendedMoniker
impl From<Moniker> for ExtendedMoniker
Source§impl NativeIntoFidl<String> for Moniker
impl NativeIntoFidl<String> for Moniker
fn native_into_fidl(self) -> String
Source§impl Ord for Moniker
impl Ord for Moniker
Source§impl PartialOrd for Moniker
impl PartialOrd for Moniker
Source§impl TryFrom<&str> for Moniker
impl TryFrom<&str> for Moniker
Source§type Error = MonikerError
type Error = MonikerError
The type returned in the event of a conversion error.
impl Eq for Moniker
impl StructuralPartialEq for Moniker
Auto Trait Implementations§
impl Freeze for Moniker
impl RefUnwindSafe for Moniker
impl Send for Moniker
impl Sync for Moniker
impl Unpin for Moniker
impl UnwindSafe for Moniker
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)