pub struct ChildName { /* private fields */ }
Expand description
A ChildName locally identifies a child component instance using the name assigned by its parent and its collection (if present). It is the building block of [Moniker].
Display notation: “[collection:]name”.
Implementations§
Source§impl ChildName
impl ChildName
pub fn new(name: LongName, collection: Option<Name>) -> Self
pub fn try_new<S>(name: S, collection: Option<S>) -> Result<Self, MonikerError>
Sourcepub fn parse<T: AsRef<str>>(rep: T) -> Result<Self, MonikerError>
pub fn parse<T: AsRef<str>>(rep: T) -> Result<Self, MonikerError>
Parses a ChildName
from a string.
Input strings should be of the format [collection:]name
, e.g. foo
or biz:foo
.
pub fn name(&self) -> &BorrowedLongName
pub fn collection(&self) -> Option<&BorrowedName>
Methods from Deref<Target = BorrowedChildName>§
pub fn name(&self) -> &BorrowedLongName
pub fn collection(&self) -> Option<&BorrowedName>
Trait Implementations§
Source§impl AsRef<BorrowedChildName> for ChildName
impl AsRef<BorrowedChildName> for ChildName
Source§fn as_ref(&self) -> &BorrowedChildName
fn as_ref(&self) -> &BorrowedChildName
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<BorrowedChildName> for ChildName
impl Borrow<BorrowedChildName> for ChildName
Source§fn borrow(&self) -> &BorrowedChildName
fn borrow(&self) -> &BorrowedChildName
Immutably borrows from an owned value. Read more
Source§impl Deref for ChildName
impl Deref for ChildName
Source§type Target = BorrowedChildName
type Target = BorrowedChildName
The resulting type after dereferencing.
Source§fn deref(&self) -> &BorrowedChildName
fn deref(&self) -> &BorrowedChildName
Dereferences the value.
Source§impl From<&BorrowedChildName> for ChildName
impl From<&BorrowedChildName> for ChildName
Source§fn from(o: &BorrowedChildName) -> Self
fn from(o: &BorrowedChildName) -> Self
Converts to this type from the input type.
Source§impl Ord for ChildName
impl Ord for ChildName
Source§impl PartialEq<BorrowedChildName> for ChildName
impl PartialEq<BorrowedChildName> for ChildName
Source§impl PartialEq<ChildName> for BorrowedChildName
impl PartialEq<ChildName> for BorrowedChildName
Source§impl PartialOrd for ChildName
impl PartialOrd for ChildName
impl Eq for ChildName
impl StructuralPartialEq for ChildName
Auto Trait Implementations§
impl Freeze for ChildName
impl RefUnwindSafe for ChildName
impl Send for ChildName
impl Sync for ChildName
impl Unpin for ChildName
impl UnwindSafe for ChildName
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<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