pub struct BorrowedChildName { /* private fields */ }Expand description
Like ChildName, except it holds a string slice rather than an allocated string. For
example, the [Moniker] API uses this to return path segments without making an allocation.
Implementations§
Source§impl BorrowedChildName
 
impl BorrowedChildName
Sourcepub fn parse<S: AsRef<str> + ?Sized>(s: &S) -> Result<&Self, MonikerError>
 
pub fn parse<S: AsRef<str> + ?Sized>(s: &S) -> 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>
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 AsRef<str> for BorrowedChildName
 
impl AsRef<str> for BorrowedChildName
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 Borrow<str> for &BorrowedChildName
 
impl Borrow<str> for &BorrowedChildName
Source§impl Borrow<str> for BorrowedChildName
 
impl Borrow<str> for BorrowedChildName
Source§impl Debug for BorrowedChildName
 
impl Debug for BorrowedChildName
Source§impl Display for BorrowedChildName
 
impl Display for BorrowedChildName
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 From<&BorrowedChildName> for ChildRef
 
impl From<&BorrowedChildName> for ChildRef
Source§fn from(child_name: &BorrowedChildName) -> Self
 
fn from(child_name: &BorrowedChildName) -> Self
Converts to this type from the input type.
Source§impl Hash for BorrowedChildName
 
impl Hash for BorrowedChildName
Source§impl Ord for BorrowedChildName
 
impl Ord for BorrowedChildName
Source§impl PartialEq<&str> for BorrowedChildName
 
impl PartialEq<&str> for BorrowedChildName
Source§impl PartialEq<BorrowedChildName> for ChildName
 
impl PartialEq<BorrowedChildName> for ChildName
Source§impl PartialEq<ChildName> for BorrowedChildName
 
impl PartialEq<ChildName> for BorrowedChildName
Source§impl PartialEq<String> for BorrowedChildName
 
impl PartialEq<String> for BorrowedChildName
Source§impl PartialEq for BorrowedChildName
 
impl PartialEq for BorrowedChildName
Source§impl PartialOrd for BorrowedChildName
 
impl PartialOrd for BorrowedChildName
impl Eq for BorrowedChildName
impl StructuralPartialEq for BorrowedChildName
Auto Trait Implementations§
impl Freeze for BorrowedChildName
impl RefUnwindSafe for BorrowedChildName
impl Send for BorrowedChildName
impl !Sized for BorrowedChildName
impl Sync for BorrowedChildName
impl Unpin for BorrowedChildName
impl UnwindSafe for BorrowedChildName
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<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.