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.
Source§impl<const N: usize> Hash for BoundedBorrowedName<N>
impl<const N: usize> Hash for BoundedBorrowedName<N>
Source§impl<const N: usize> Ord for BoundedBorrowedName<N>
impl<const N: usize> Ord for BoundedBorrowedName<N>
Source§impl<const N: usize> PartialEq<BoundedBorrowedName<N>> for BoundedName<N>
impl<const N: usize> PartialEq<BoundedBorrowedName<N>> for BoundedName<N>
Source§impl<const N: usize> PartialEq<BoundedName<N>> for BoundedBorrowedName<N>
impl<const N: usize> PartialEq<BoundedName<N>> for BoundedBorrowedName<N>
Source§impl<const N: usize> PartialEq for BoundedBorrowedName<N>
impl<const N: usize> PartialEq for BoundedBorrowedName<N>
Source§impl<const N: usize> PartialOrd for BoundedBorrowedName<N>
impl<const N: usize> PartialOrd for BoundedBorrowedName<N>
Source§impl<const N: usize> Serialize for BoundedBorrowedName<N>
impl<const N: usize> Serialize for BoundedBorrowedName<N>
Source§impl<const N: usize> ToOwned for BoundedBorrowedName<N>
impl<const N: usize> ToOwned for BoundedBorrowedName<N>
Source§type Owned = BoundedName<N>
type Owned = BoundedName<N>
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<const N: usize> Eq for BoundedBorrowedName<N>
impl<const N: usize> StructuralPartialEq for BoundedBorrowedName<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for BoundedBorrowedName<N>
impl<const N: usize> RefUnwindSafe for BoundedBorrowedName<N>
impl<const N: usize> Send for BoundedBorrowedName<N>
impl<const N: usize> !Sized for BoundedBorrowedName<N>
impl<const N: usize> Sync for BoundedBorrowedName<N>
impl<const N: usize> Unpin for BoundedBorrowedName<N>
impl<const N: usize> UnwindSafe for BoundedBorrowedName<N>
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.