Struct UstarHeader
#[repr(C)]
pub struct UstarHeader { 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 prefix: [u8; 155], pub pad: [u8; 12] }
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]prefix: [u8; 155]pad: [u8; 12]
Implementations
impl UstarHeader
fn path_bytes(&self) -> Cow<'_, [u8]>See
Header::path_bytesfn set_path<P: AsRef<Path>>(&mut self, p: P) -> Result<()>See
Header::set_pathfn set_path_absolute<P: AsRef<Path>>(&mut self, p: P) -> Result<()>See
Header::set_path_absolutefn username_bytes(&self) -> &[u8]See
Header::username_bytesfn set_username(&mut self, name: &str) -> Result<()>See
Header::set_usernamefn groupname_bytes(&self) -> &[u8]See
Header::groupname_bytesfn set_groupname(&mut self, name: &str) -> Result<()>See
Header::set_groupnamefn device_major(&self) -> Result<u32>See
Header::device_majorfn set_device_major(&mut self, major: u32)See
Header::set_device_majorfn device_minor(&self) -> Result<u32>See
Header::device_minorfn set_device_minor(&mut self, minor: u32)See
Header::set_device_minorfn as_header(&self) -> &HeaderViews this as a normal
Headerfn as_header_mut(&mut self) -> &mut HeaderViews this as a normal
Header
Trait Implementations
impl Debug for UstarHeader
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl Freeze for UstarHeader
impl RefUnwindSafe for UstarHeader
impl Send for UstarHeader
impl Sync for UstarHeader
impl Unpin for UstarHeader
impl UnsafeUnpin for UstarHeader
impl UnwindSafe for UstarHeader
Blanket Implementations
impl<T> Any for UstarHeader
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for UstarHeader
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for UstarHeader
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for UstarHeader
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for UstarHeader
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 UstarHeader
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for UstarHeader
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>