pub struct BoundedBorrowedName<const N: usize>(/* private fields */);
Expand description
Like BoundedName
, except it holds a string slice rather than an allocated string. For
example, the Path
API uses this to return path segments without making an allocation.
Implementations§
Source§impl BoundedBorrowedName<MAX_NAME_LENGTH>
impl BoundedBorrowedName<MAX_NAME_LENGTH>
pub fn to_long(&self) -> &BorrowedLongName
Source§impl<const N: usize> BoundedBorrowedName<N>
impl<const N: usize> BoundedBorrowedName<N>
Trait Implementations§
Source§impl<const N: usize> AsRef<BoundedBorrowedName<N>> for BoundedName<N>
impl<const N: usize> AsRef<BoundedBorrowedName<N>> for BoundedName<N>
Source§fn as_ref(&self) -> &BoundedBorrowedName<N>
fn as_ref(&self) -> &BoundedBorrowedName<N>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<const N: usize> Borrow<BoundedBorrowedName<N>> for BoundedName<N>
impl<const N: usize> Borrow<BoundedBorrowedName<N>> for BoundedName<N>
Source§fn borrow(&self) -> &BoundedBorrowedName<N>
fn borrow(&self) -> &BoundedBorrowedName<N>
Immutably borrows from an owned value. Read more
Source§impl<const N: usize> Debug for BoundedBorrowedName<N>
impl<const N: usize> Debug for BoundedBorrowedName<N>
Source§impl<const N: usize> Display for BoundedBorrowedName<N>
impl<const N: usize> Display for BoundedBorrowedName<N>
Source§impl<'a> From<&'a BoundedBorrowedName<MAX_NAME_LENGTH>> for &'a BorrowedLongName
impl<'a> From<&'a BoundedBorrowedName<MAX_NAME_LENGTH>> for &'a BorrowedLongName
Source§fn from(name: &'a BorrowedName) -> Self
fn from(name: &'a BorrowedName) -> Self
Converts to this type from the input type.
Source§impl<'a, const N: usize> From<&'a BoundedBorrowedName<N>> for &'a str
impl<'a, const N: usize> From<&'a BoundedBorrowedName<N>> for &'a str
Source§fn from(o: &'a BoundedBorrowedName<N>) -> Self
fn from(o: &'a BoundedBorrowedName<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<&BoundedBorrowedName<N>> for BoundedName<N>
impl<const N: usize> From<&BoundedBorrowedName<N>> for BoundedName<N>
Source§fn from(o: &BoundedBorrowedName<N>) -> Self
fn from(o: &BoundedBorrowedName<N>) -> Self
Converts to this type from the input type.