[][src]Struct basic_tar::Header

pub struct Header {
    pub path: String,
    pub mode: Option<u64>,
    pub uid: Option<u64>,
    pub gid: Option<u64>,
    pub size: u64,
    pub mtime: Option<u64>,
    pub typeflag: u8,
    pub linkname: Option<String>,
}

A tar header

Fields

path: String

The record's path and name

mode: Option<u64>

The record's access mode bits (e.g. 0o777)

uid: Option<u64>

The record's UID

gid: Option<u64>

The record's GID

size: u64

The record's size

mtime: Option<u64>

The record's modification time

typeflag: u8

The record's type

linkname: Option<String>

The record's link name

Methods

impl Header[src]

pub fn parse(data: Raw) -> Result<Self, BasicTarError>[src]

Parses a raw byte block into a classic tar header

pub fn serialize(self) -> Result<Raw, BasicTarError>[src]

Serializes the tar header into a raw byte block

Note: this function can fail because the struct may contain values that cannot be serialized, e.g. a name longer than 100 bytes or a size greater than 8 GiB

Trait Implementations

impl Default for Header[src]

impl Clone for Header[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Header> for Header[src]

impl Eq for Header[src]

impl Debug for Header[src]

Auto Trait Implementations

impl Sync for Header

impl Unpin for Header

impl Send for Header

impl UnwindSafe for Header

impl RefUnwindSafe for Header

Blanket Implementations

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> From<T> for T[src]

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.

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

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

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