[][src]Struct metagoblin::archive::MemberHeader

#[repr(C)]pub struct MemberHeader {
    pub identifier: [u8; 16],
    pub timestamp: [u8; 12],
    pub owner_id: [u8; 6],
    pub group_id: [u8; 6],
    pub mode: [u8; 8],
    pub file_size: [u8; 10],
    pub terminator: [u8; 2],
}

A Unix Archive Header - meta data for the file/byte blob/whatever that follows exactly after. All data is right-padded with spaces ASCII 0x20. The Binary layout is as follows:

OffsetLengthNameFormat
016File identifierASCII
1612File modification timestampDecimal
286Owner IDDecimal
346Group IDDecimal
408File modeOctal
4810Filesize in bytesDecimal
582Ending characters0x60 0x0A

Byte alignment is according to the following:

Each archive file member begins on an even byte boundary; a newline is inserted between files if necessary. Nevertheless, the size given reflects the actual size of the file exclusive of padding.

Fields

identifier: [u8; 16]

The identifier, or name for this file/whatever.

timestamp: [u8; 12]

The timestamp for when this file was last modified. Base 10 number

owner_id: [u8; 6]

The file's owner's id. Base 10 string number

group_id: [u8; 6]

The file's group id. Base 10 string number

mode: [u8; 8]

The file's permissions mode. Base 8 number number

file_size: [u8; 10]

The size of this file. Base 10 string number

terminator: [u8; 2]

The file header's terminator, always 0x60 0x0A

Implementations

impl MemberHeader[src]

pub fn name(&self) -> Result<&str, Error>[src]

pub fn size(&self) -> Result<usize, Error>[src]

Trait Implementations

impl Clone for MemberHeader[src]

impl Debug for MemberHeader[src]

impl PartialEq<MemberHeader> for MemberHeader[src]

impl SizeWith<Endian> for MemberHeader[src]

impl StructuralPartialEq for MemberHeader[src]

impl<'a> TryFromCtx<'a, Endian, [u8]> for MemberHeader where
    MemberHeader: 'a, 
[src]

type Error = Error

impl<'a> TryIntoCtx<Endian, [u8]> for &'a MemberHeader[src]

type Error = Error

impl TryIntoCtx<Endian, [u8]> for MemberHeader[src]

type Error = Error

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.