#[repr(C)]pub struct GnuHeader {Show 24 fields
pub name: [u8; 100],
pub mode: [u8; 8],
pub uid: [u8; 8],
pub gid: [u8; 8],
pub size: [u8; 12],
pub mtime: [u8; 12],
pub cksum: [u8; 8],
pub typeflag: [u8; 1],
pub linkname: [u8; 100],
pub magic: [u8; 6],
pub version: [u8; 2],
pub uname: [u8; 32],
pub gname: [u8; 32],
pub dev_major: [u8; 8],
pub dev_minor: [u8; 8],
pub atime: [u8; 12],
pub ctime: [u8; 12],
pub offset: [u8; 12],
pub longnames: [u8; 4],
pub unused: [u8; 1],
pub sparse: [GnuSparseHeader; 4],
pub isextended: [u8; 1],
pub realsize: [u8; 12],
pub pad: [u8; 17],
}
Expand description
Representation of the header of an entry in an archive
Fields§
§name: [u8; 100]
§mode: [u8; 8]
§uid: [u8; 8]
§gid: [u8; 8]
§size: [u8; 12]
§mtime: [u8; 12]
§cksum: [u8; 8]
§typeflag: [u8; 1]
§linkname: [u8; 100]
§magic: [u8; 6]
§version: [u8; 2]
§uname: [u8; 32]
§gname: [u8; 32]
§dev_major: [u8; 8]
§dev_minor: [u8; 8]
§atime: [u8; 12]
§ctime: [u8; 12]
§offset: [u8; 12]
§longnames: [u8; 4]
§unused: [u8; 1]
§sparse: [GnuSparseHeader; 4]
§isextended: [u8; 1]
§realsize: [u8; 12]
§pad: [u8; 17]
Implementations§
Source§impl GnuHeader
impl GnuHeader
Sourcepub fn username_bytes(&self) -> &[u8] ⓘ
pub fn username_bytes(&self) -> &[u8] ⓘ
See Header::username_bytes
Sourcepub fn groupname_bytes(&self) -> &[u8] ⓘ
pub fn groupname_bytes(&self) -> &[u8] ⓘ
See Header::groupname_bytes
Sourcepub fn device_major(&self) -> Result<u32, Error>
pub fn device_major(&self) -> Result<u32, Error>
See Header::device_major
Sourcepub fn set_device_major(&mut self, major: u32)
pub fn set_device_major(&mut self, major: u32)
See Header::set_device_major
Sourcepub fn device_minor(&self) -> Result<u32, Error>
pub fn device_minor(&self) -> Result<u32, Error>
See Header::device_minor
Sourcepub fn set_device_minor(&mut self, minor: u32)
pub fn set_device_minor(&mut self, minor: u32)
See Header::set_device_minor
Sourcepub fn atime(&self) -> Result<u64, Error>
pub fn atime(&self) -> Result<u64, Error>
Returns the last modification time in Unix time format
Sourcepub fn set_atime(&mut self, atime: u64)
pub fn set_atime(&mut self, atime: u64)
Encodes the atime
provided into this header.
Note that this time is typically a number of seconds passed since January 1, 1970.
Sourcepub fn ctime(&self) -> Result<u64, Error>
pub fn ctime(&self) -> Result<u64, Error>
Returns the last modification time in Unix time format
Sourcepub fn set_ctime(&mut self, ctime: u64)
pub fn set_ctime(&mut self, ctime: u64)
Encodes the ctime
provided into this header.
Note that this time is typically a number of seconds passed since January 1, 1970.
Sourcepub fn real_size(&self) -> Result<u64, Error>
pub fn real_size(&self) -> Result<u64, Error>
Returns the “real size” of the file this header represents.
This is applicable for sparse files where the returned size here is the size of the entire file after the sparse regions have been filled in.
Sourcepub fn set_real_size(&mut self, real_size: u64)
pub fn set_real_size(&mut self, real_size: u64)
Encodes the real_size
provided into this header.
Sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
Indicates whether this header will be followed by additional sparse-header records.
Note that this is handled internally by this library, and is likely only
interesting if a raw
iterator is being used.
Sourcepub fn set_is_extended(&mut self, is_extended: bool)
pub fn set_is_extended(&mut self, is_extended: bool)
Sets whether this header should be followed by additional sparse-header records.
To append a sparse std::fs::File
to an archive, prefer using the
crate::Builder
instead.
Sourcepub fn as_header_mut(&mut self) -> &mut Header
pub fn as_header_mut(&mut self) -> &mut Header
Views this as a normal Header
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GnuHeader
impl RefUnwindSafe for GnuHeader
impl Send for GnuHeader
impl Sync for GnuHeader
impl Unpin for GnuHeader
impl UnwindSafe for GnuHeader
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters
when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self
into C
, using the provided parameters.Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle
.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other
into Self
, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T
.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters
when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self
into C
, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
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 moreSource§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self
into T
, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors
fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains
the unclamped color. Read more