pub struct Header { /* private fields */ }
Expand description
Representation of an archive entry header.
Implementations§
source§impl Header
impl Header
sourcepub fn new(identifier: Vec<u8>, size: u64) -> Header
pub fn new(identifier: Vec<u8>, size: u64) -> Header
Creates a header with the given file identifier and size, and all other fields set to zero.
sourcepub fn from_metadata(identifier: Vec<u8>, meta: &Metadata) -> Header
pub fn from_metadata(identifier: Vec<u8>, meta: &Metadata) -> Header
Creates a header with the given file identifier and all other fields set from the given filesystem metadata.
sourcepub fn identifier(&self) -> &[u8] ⓘ
pub fn identifier(&self) -> &[u8] ⓘ
Returns the file identifier.
sourcepub fn set_identifier(&mut self, identifier: Vec<u8>)
pub fn set_identifier(&mut self, identifier: Vec<u8>)
Sets the file identifier.
Trait Implementations§
source§impl PartialEq<Header> for Header
impl PartialEq<Header> for Header
impl Eq for Header
impl StructuralEq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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