Struct binstall_tar::UstarHeader
source · #[repr(C)]pub struct UstarHeader {Show 17 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 prefix: [u8; 155],
pub pad: [u8; 12],
}
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]
§prefix: [u8; 155]
§pad: [u8; 12]
Implementations§
source§impl UstarHeader
impl UstarHeader
sourcepub fn path_bytes(&self) -> Cow<'_, [u8]>
pub fn path_bytes(&self) -> Cow<'_, [u8]>
See Header::path_bytes
sourcepub fn username_bytes(&self) -> &[u8] ⓘ
pub fn username_bytes(&self) -> &[u8] ⓘ
See Header::username_bytes
sourcepub fn set_username(&mut self, name: &str) -> Result<()>
pub fn set_username(&mut self, name: &str) -> Result<()>
See Header::set_username
sourcepub fn groupname_bytes(&self) -> &[u8] ⓘ
pub fn groupname_bytes(&self) -> &[u8] ⓘ
See Header::groupname_bytes
sourcepub fn set_groupname(&mut self, name: &str) -> Result<()>
pub fn set_groupname(&mut self, name: &str) -> Result<()>
See Header::set_groupname
sourcepub fn device_major(&self) -> Result<u32>
pub fn device_major(&self) -> Result<u32>
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>
pub fn device_minor(&self) -> Result<u32>
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 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 UstarHeader
impl RefUnwindSafe for UstarHeader
impl Send for UstarHeader
impl Sync for UstarHeader
impl Unpin for UstarHeader
impl UnwindSafe for UstarHeader
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
Mutably borrows from an owned value. Read more