pub struct DirEntryName<'a>(/* private fields */);
Expand description
Name of a DirEntry
, stored as a reference.
This is guaranteed at construction to be a valid directory entry name.
Implementations§
Source§impl<'a> DirEntryName<'a>
impl<'a> DirEntryName<'a>
Sourcepub fn as_str(&self) -> Result<&'a str, Utf8Error>
pub fn as_str(&self) -> Result<&'a str, Utf8Error>
Convert to a &str
if the name is valid UTF-8.
Sourcepub fn display(&self) -> BytesDisplay<'_>
pub fn display(&self) -> BytesDisplay<'_>
Get an object that implements Display
to allow conveniently
printing names that may or may not be valid UTF-8. Non-UTF-8
characters will be replaced with ‘�’.
Trait Implementations§
Source§impl<'a> AsRef<[u8]> for DirEntryName<'a>
impl<'a> AsRef<[u8]> for DirEntryName<'a>
Source§impl<'a> Clone for DirEntryName<'a>
impl<'a> Clone for DirEntryName<'a>
Source§fn clone(&self) -> DirEntryName<'a>
fn clone(&self) -> DirEntryName<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DirEntryName<'_>
impl Debug for DirEntryName<'_>
Source§impl<'a> Hash for DirEntryName<'a>
impl<'a> Hash for DirEntryName<'a>
Source§impl<'a> Ord for DirEntryName<'a>
impl<'a> Ord for DirEntryName<'a>
Source§fn cmp(&self, other: &DirEntryName<'a>) -> Ordering
fn cmp(&self, other: &DirEntryName<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialEq<T> for DirEntryName<'_>
impl<T> PartialEq<T> for DirEntryName<'_>
Source§impl<'a> PartialOrd for DirEntryName<'a>
impl<'a> PartialOrd for DirEntryName<'a>
Source§impl<'a> TryFrom<&'a [u8]> for DirEntryName<'a>
impl<'a> TryFrom<&'a [u8]> for DirEntryName<'a>
Source§type Error = DirEntryNameError
type Error = DirEntryNameError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<&'a str> for DirEntryName<'a>
impl<'a> TryFrom<&'a str> for DirEntryName<'a>
Source§type Error = DirEntryNameError
type Error = DirEntryNameError
The type returned in the event of a conversion error.
impl<'a> Copy for DirEntryName<'a>
impl<'a> Eq for DirEntryName<'a>
Auto Trait Implementations§
impl<'a> Freeze for DirEntryName<'a>
impl<'a> RefUnwindSafe for DirEntryName<'a>
impl<'a> Send for DirEntryName<'a>
impl<'a> Sync for DirEntryName<'a>
impl<'a> Unpin for DirEntryName<'a>
impl<'a> UnwindSafe for DirEntryName<'a>
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