#[non_exhaustive]pub enum EntryType {
Show 14 variants
Regular,
Link,
Symlink,
Char,
Block,
Directory,
Fifo,
Continuous,
GNULongName,
GNULongLink,
GNUSparse,
XGlobalHeader,
XHeader,
Other(u8),
}
Expand description
Indicate for the type of file described by a header.
Each Header
has an entry_type
method returning an instance of this type
which can be used to inspect what the header is describing.
A non-exhaustive enum representing the possible entry types
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Regular
Regular file
Link
Hard link
Symlink
Symbolic link
Char
Character device
Block
Block device
Directory
Directory
Fifo
Named pipe (fifo)
Continuous
Implementation-defined ‘high-performance’ type, treated as regular file
GNULongName
GNU extension - long file name
GNULongLink
GNU extension - long link name (link target)
GNUSparse
GNU extension - sparse file
XGlobalHeader
Global extended header
XHeader
Extended Header
Other(u8)
Unknown header,
Implementations§
source§impl EntryType
impl EntryType
sourcepub fn new(byte: u8) -> EntryType
pub fn new(byte: u8) -> EntryType
Creates a new entry type from a raw byte.
Note that the other named constructors of entry type may be more appropriate to create a file type from.
sourcepub fn character_special() -> EntryType
pub fn character_special() -> EntryType
Creates a new entry type representing a character special device.
sourcepub fn block_special() -> EntryType
pub fn block_special() -> EntryType
Creates a new entry type representing a block special device.
sourcepub fn contiguous() -> EntryType
pub fn contiguous() -> EntryType
Creates a new entry type representing a contiguous file.
sourcepub fn is_hard_link(self) -> bool
pub fn is_hard_link(self) -> bool
Returns whether this type represents a hard link.
sourcepub fn is_symlink(self) -> bool
pub fn is_symlink(self) -> bool
Returns whether this type represents a symlink.
sourcepub fn is_character_special(self) -> bool
pub fn is_character_special(self) -> bool
Returns whether this type represents a character special device.
sourcepub fn is_block_special(self) -> bool
pub fn is_block_special(self) -> bool
Returns whether this type represents a block special device.
sourcepub fn is_contiguous(self) -> bool
pub fn is_contiguous(self) -> bool
Returns whether this type represents a contiguous file.
sourcepub fn is_gnu_longname(self) -> bool
pub fn is_gnu_longname(self) -> bool
Returns whether this type represents a GNU long name header.
sourcepub fn is_gnu_sparse(self) -> bool
pub fn is_gnu_sparse(self) -> bool
Returns whether this type represents a GNU sparse header.
sourcepub fn is_gnu_longlink(self) -> bool
pub fn is_gnu_longlink(self) -> bool
Returns whether this type represents a GNU long link header.
sourcepub fn is_pax_global_extensions(self) -> bool
pub fn is_pax_global_extensions(self) -> bool
Returns whether this type represents a GNU long name header.
sourcepub fn is_pax_local_extensions(self) -> bool
pub fn is_pax_local_extensions(self) -> bool
Returns whether this type represents a GNU long link header.
Trait Implementations§
source§impl PartialEq for EntryType
impl PartialEq for EntryType
impl Copy for EntryType
impl Eq for EntryType
impl StructuralPartialEq for EntryType
Auto Trait Implementations§
impl Freeze for EntryType
impl RefUnwindSafe for EntryType
impl Send for EntryType
impl Sync for EntryType
impl Unpin for EntryType
impl UnwindSafe for EntryType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)