#[repr(C, packed(1))]pub struct DirentHeader {
pub ino: u64,
pub file_type: u8,
pub name_len: u16,
pub _padding: u8,
}Expand description
Fixed-size header for each directory entry in the SYS_GETDENTS wire format.
Wire layout per entry: DirentHeader (12 bytes) followed by name_len
bytes of filename data and a trailing NUL byte.
Fields§
§ino: u64§file_type: u8§name_len: u16§_padding: u8Implementations§
Source§impl DirentHeader
impl DirentHeader
Trait Implementations§
Source§impl Clone for DirentHeader
impl Clone for DirentHeader
Source§fn clone(&self) -> DirentHeader
fn clone(&self) -> DirentHeader
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 DirentHeader
impl Debug for DirentHeader
Source§impl FromBytes for DirentHeader
impl FromBytes for DirentHeader
Source§impl FromZeros for DirentHeader
impl FromZeros for DirentHeader
Source§impl IntoBytes for DirentHeader
impl IntoBytes for DirentHeader
§fn as_mut_bytes(&mut self) -> &mut [u8]where
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8]where
Self: FromBytes,
Gets the bytes of this value mutably. Read more
Source§impl TryFromBytes for DirentHeader
impl TryFromBytes for DirentHeader
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
impl Copy for DirentHeader
Auto Trait Implementations§
impl Freeze for DirentHeader
impl RefUnwindSafe for DirentHeader
impl Send for DirentHeader
impl Sync for DirentHeader
impl Unpin for DirentHeader
impl UnsafeUnpin for DirentHeader
impl UnwindSafe for DirentHeader
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