pub struct DataKind(/* private fields */);Expand description
Type of filesystem object represented by an entry.
Each value determines how the entry’s data should be interpreted and how the entry should be extracted to the filesystem. Values without an associated constant are either reserved for future PNA specification (raw value < 128) or application-specific private values (raw value >= 128).
Implementations§
Source§impl DataKind
impl DataKind
Sourcepub const SYMBOLIC_LINK: Self
pub const SYMBOLIC_LINK: Self
Symbolic link. Entry data contains the UTF-8 encoded link target path.
Sourcepub const HARD_LINK: Self
pub const HARD_LINK: Self
Hard link. Entry data contains the UTF-8 encoded path of the target entry within the same archive.
Sourcepub const File: Self = Self::FILE
👎Deprecated since 0.36.0: renamed to DataKind::FILE
pub const File: Self = Self::FILE
renamed to DataKind::FILE
Deprecated alias of DataKind::FILE.
Sourcepub const Directory: Self = Self::DIRECTORY
👎Deprecated since 0.36.0: renamed to DataKind::DIRECTORY
pub const Directory: Self = Self::DIRECTORY
renamed to DataKind::DIRECTORY
Deprecated alias of DataKind::DIRECTORY.
Sourcepub const SymbolicLink: Self = Self::SYMBOLIC_LINK
👎Deprecated since 0.36.0: renamed to DataKind::SYMBOLIC_LINK
pub const SymbolicLink: Self = Self::SYMBOLIC_LINK
renamed to DataKind::SYMBOLIC_LINK
Deprecated alias of DataKind::SYMBOLIC_LINK.
Sourcepub const HardLink: Self = Self::HARD_LINK
👎Deprecated since 0.36.0: renamed to DataKind::HARD_LINK
pub const HardLink: Self = Self::HARD_LINK
renamed to DataKind::HARD_LINK
Deprecated alias of DataKind::HARD_LINK.
Sourcepub const fn from_byte(value: u8) -> Self
pub const fn from_byte(value: u8) -> Self
Deserializes a data kind from its u8 representation.
Every byte value is a valid data kind, so this conversion never fails.
Sourcepub const fn new_private(value: u8) -> Option<Self>
pub const fn new_private(value: u8) -> Option<Self>
Creates an application-specific private value.
Returns Some if value is in the private range (128..=255),
otherwise None.
Sourcepub const fn try_from(value: u8) -> Result<Self, UnknownValueError>
👎Deprecated since 0.36.0: use DataKind::from_byte
pub const fn try_from(value: u8) -> Result<Self, UnknownValueError>
use DataKind::from_byte
Sourcepub const fn is_reserved(self) -> bool
pub const fn is_reserved(self) -> bool
Returns true if this value is reserved for future PNA specification
(unassigned and raw value < 128).
Sourcepub const fn is_private(self) -> bool
pub const fn is_private(self) -> bool
Returns true if this is an application-specific private value
(raw value >= 128).
Trait Implementations§
impl Copy for DataKind
impl Eq for DataKind
Source§impl Ord for DataKind
impl Ord for DataKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for DataKind
impl PartialOrd for DataKind
impl StructuralPartialEq for DataKind
Auto Trait Implementations§
impl Freeze for DataKind
impl RefUnwindSafe for DataKind
impl Send for DataKind
impl Sync for DataKind
impl Unpin for DataKind
impl UnsafeUnpin for DataKind
impl UnwindSafe for DataKind
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more