#[repr(C)]pub struct GnuSparseHeader {
pub offset: [u8; 12],
pub numbytes: [u8; 12],
}
Expand description
Description of the header of a spare entry.
Specifies the offset/number of bytes of a chunk of data in octal.
Fields§
§offset: [u8; 12]
§numbytes: [u8; 12]
Implementations§
Source§impl GnuSparseHeader
impl GnuSparseHeader
Sourcepub fn offset(&self) -> Result<u64>
pub fn offset(&self) -> Result<u64>
Offset of the block from the start of the file
Returns Err
for a malformed offset
field.
Sourcepub fn set_offset(&mut self, offset: u64)
pub fn set_offset(&mut self, offset: u64)
Encodes the offset
provided into this header.
Sourcepub fn length(&self) -> Result<u64>
pub fn length(&self) -> Result<u64>
Length of the block
Returns Err
for a malformed numbytes
field.
Sourcepub fn set_length(&mut self, length: u64)
pub fn set_length(&mut self, length: u64)
Encodes the length
provided into this header.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GnuSparseHeader
impl RefUnwindSafe for GnuSparseHeader
impl Send for GnuSparseHeader
impl Sync for GnuSparseHeader
impl Unpin for GnuSparseHeader
impl UnwindSafe for GnuSparseHeader
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