[][src]Struct gzip_header::GzBuilder

pub struct GzBuilder { /* fields omitted */ }

A builder structure to create a new gzip header.

This structure controls header configuration options such as the filename.

Methods

impl GzBuilder[src]

pub fn new() -> GzBuilder[src]

Create a new blank builder with no header by default.

pub fn mtime(self, mtime: u32) -> GzBuilder[src]

Configure the mtime field in the gzip header.

pub fn extra<T: Into<Vec<u8>>>(self, extra: T) -> GzBuilder[src]

Configure the extra field in the gzip header.

pub fn filename<T: Into<Vec<u8>>>(self, filename: T) -> GzBuilder[src]

Configure the filename field in the gzip header.

Panics

Panics if the filename argument contains a byte with the value 0.

pub fn comment<T: Into<Vec<u8>>>(self, comment: T) -> GzBuilder[src]

Configure the comment field in the gzip header.

Panics

Panics if the comment argument contains a byte with the value 0.

pub fn os(self, os: FileSystemType) -> GzBuilder[src]

Configure the os field in the gzip header.

This is taken from std::env::consts::OS if not set explicitly.

pub fn xfl(self, xfl: ExtraFlags) -> GzBuilder[src]

Configure the xfl field in the gzip header.

The default is ExtraFlags::Default (meaning not set).

pub fn into_header_xfl(self, lvl: ExtraFlags) -> Vec<u8>[src]

Transforms this builder structure into a raw vector of bytes, setting the XFL field to the value specified by lvl.

pub fn into_header(self) -> Vec<u8>[src]

Transforms this builder structure into a raw vector of bytes.

pub fn into_header_with_checksum(self) -> Vec<u8>[src]

Transforms this builder structure into a raw vector of bytes.

Trait Implementations

impl Default for GzBuilder[src]

impl Clone for GzBuilder[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<GzBuilder> for GzBuilder[src]

impl Eq for GzBuilder[src]

impl Debug for GzBuilder[src]

Auto Trait Implementations

impl Send for GzBuilder

impl Sync for GzBuilder

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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