Struct gzip_header::GzBuilder
[−]
[src]
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]
fn new() -> GzBuilder
Create a new blank builder with no header by default.
fn mtime(self, mtime: u32) -> GzBuilder
Configure the mtime field in the gzip header.
fn extra<T: Into<Vec<u8>>>(self, extra: T) -> GzBuilder
Configure the extra field in the gzip header.
fn filename<T: Into<Vec<u8>>>(self, filename: T) -> GzBuilder
Configure the filename field in the gzip header.
Panics
Panics if the filename argument contains a byte with the value 0.
fn comment<T: Into<Vec<u8>>>(self, comment: T) -> GzBuilder
Configure the comment field in the gzip header.
Panics
Panics if the comment argument contains a byte with the value 0.
fn os(self, os: FileSystemType) -> GzBuilder
Configure the os field in the gzip header.
This is taken from std::env::consts::OS if not set explicitly.
fn xfl(self, xfl: ExtraFlags) -> GzBuilder
Configure the xfl field in the gzip header.
The default is ExtraFlags::Default (meaning not set).
fn into_header_xfl(self, lvl: ExtraFlags) -> Vec<u8>
Transforms this builder structure into a raw vector of bytes, setting the XFL field to the
value specified by lvl.
fn into_header(self) -> Vec<u8>
Transforms this builder structure into a raw vector of bytes.
fn into_header_with_checksum(self) -> Vec<u8>
Transforms this builder structure into a raw vector of bytes.
Trait Implementations
impl Debug for GzBuilder[src]
impl Default for GzBuilder[src]
impl Clone for GzBuilder[src]
fn clone(&self) -> GzBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more