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. The constituent parts of a Moniker do not include the instance ID of the child.
Display notation: “.”, “name1”, “name1/name2”, …
Trait Implementations§
source§impl From<Moniker> for ExtendedMoniker
impl From<Moniker> for ExtendedMoniker
source§impl MonikerBase for Moniker
impl MonikerBase for Moniker
type Part = ChildName
fn new(path: Vec<Self::Part>) -> Self
fn path(&self) -> &Vec<Self::Part>
fn path_mut(&mut self) -> &mut Vec<Self::Part>
fn parse<T: AsRef<str>>(path: &[T]) -> Result<Self, MonikerError>
fn parse_str(input: &str) -> Result<Self, MonikerError>
source§fn concat<T: MonikerBase<Part = Self::Part>>(&self, other: &T) -> Self
fn concat<T: MonikerBase<Part = Self::Part>>(&self, other: &T) -> Self
Concatenates other onto the end of this moniker.
source§fn has_prefix<S: MonikerBase<Part = Self::Part>>(&self, prefix: &S) -> bool
fn has_prefix<S: MonikerBase<Part = Self::Part>>(&self, prefix: &S) -> bool
Indicates whether this moniker is prefixed by prefix.
fn root() -> Self
fn leaf(&self) -> Option<&Self::Part>
fn is_root(&self) -> bool
fn parent(&self) -> Option<Self>
fn child(&self, child: Self::Part) -> Self
source§fn strip_prefix<T: MonikerBase<Part = Self::Part>>(
&self,
prefix: &T
) -> Result<Self, MonikerError>
fn strip_prefix<T: MonikerBase<Part = Self::Part>>( &self, prefix: &T ) -> Result<Self, MonikerError>
Strips the moniker parts in prefix from the beginning of this moniker.
fn compare(&self, other: &Self) -> Ordering
fn format(&self, f: &mut Formatter<'_>) -> Result
source§impl Ord for Moniker
impl Ord for Moniker
source§impl PartialEq for Moniker
impl PartialEq for Moniker
source§impl PartialOrd for Moniker
impl PartialOrd for Moniker
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&str> for Moniker
impl TryFrom<&str> for Moniker
§type Error = MonikerError
type Error = MonikerError
The type returned in the event of a conversion error.
source§impl TryFrom<Vec<&str>> for Moniker
impl TryFrom<Vec<&str>> for Moniker
§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