Struct nix::dir::Entry

#[repr(transparent)]
pub struct Entry(_);
Documentation

A directory entry, similar to std::fs::DirEntry.

Note that unlike the std version, this may represent the . or .. entries.

Implementations

impl Entry
pub fn ino(&Self) -> u64

Returns the inode number (d_ino) of the underlying dirent.

pub fn file_name(&Self) -> &ffi::CStr

Returns the bare file name of this directory entry without any other leading path component.

pub fn file_type(&Self) -> Option<Type>

Returns the type of this directory entry, if known.

See platform readdir(3) or dirent(5) manpage for when the file type is known; notably, some Linux filesystems don’t implement this. The caller should use stat or fstat if this returns None.

Trait Implementations

impl Clone for Entry
fn clone(&Self) -> Entry
impl Copy for Entry
impl Debug for Entry
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Eq for Entry
impl Hash for Entry
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl PartialEq<Entry> for Entry
fn eq(&Self, other: &Entry) -> bool
fn ne(&Self, other: &Entry) -> bool
impl StructuralEq for Entry
impl StructuralPartialEq for Entry

Auto Trait Implementations

impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>