Enum EntryType
pub enum EntryType
Indicate the type of content described by a header.
This is returned by [crate::Header::entry_type()] and should be used to
distinguish between types of content.
Variants
-
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
Implementations
impl EntryType
fn new(byte: u8) -> EntryTypeCreates 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.
fn as_byte(&self) -> u8Returns the raw underlying byte that this entry type represents.
fn file() -> EntryTypeCreates a new entry type representing a regular file.
fn hard_link() -> EntryTypeCreates a new entry type representing a hard link.
fn symlink() -> EntryTypeCreates a new entry type representing a symlink.
fn character_special() -> EntryTypeCreates a new entry type representing a character special device.
fn block_special() -> EntryTypeCreates a new entry type representing a block special device.
fn dir() -> EntryTypeCreates a new entry type representing a directory.
fn fifo() -> EntryTypeCreates a new entry type representing a FIFO.
fn contiguous() -> EntryTypeCreates a new entry type representing a contiguous file.
fn is_file(&self) -> boolReturns whether this type represents a regular file.
fn is_hard_link(&self) -> boolReturns whether this type represents a hard link.
fn is_symlink(&self) -> boolReturns whether this type represents a symlink.
fn is_character_special(&self) -> boolReturns whether this type represents a character special device.
fn is_block_special(&self) -> boolReturns whether this type represents a block special device.
fn is_dir(&self) -> boolReturns whether this type represents a directory.
fn is_fifo(&self) -> boolReturns whether this type represents a FIFO.
fn is_contiguous(&self) -> boolReturns whether this type represents a contiguous file.
fn is_gnu_longname(&self) -> boolReturns whether this type represents a GNU long name header.
fn is_gnu_sparse(&self) -> boolReturns whether this type represents a GNU sparse header.
fn is_gnu_longlink(&self) -> boolReturns whether this type represents a GNU long link header.
fn is_pax_global_extensions(&self) -> boolReturns whether this type represents PAX global extensions, that should affect all following entries. For more, see PAX.
fn is_pax_local_extensions(&self) -> boolReturns whether this type represents PAX local extensions; these only affect the current entry. For more, see PAX.
Trait Implementations
impl Clone for EntryType
fn clone(&self) -> EntryType
impl Copy for EntryType
impl Debug for EntryType
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for EntryType
impl PartialEq for EntryType
fn eq(&self, other: &EntryType) -> bool
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 UnsafeUnpin for EntryType
impl UnwindSafe for EntryType
Blanket Implementations
impl<T> Any for EntryType
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for EntryType
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for EntryType
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for EntryType
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for EntryType
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for EntryType
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for EntryType
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for EntryType
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for EntryType
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>