[−][src]Struct gzip_header::GzBuilder
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 Eq for GzBuilder
[src]
impl PartialEq<GzBuilder> for GzBuilder
[src]
impl Clone for GzBuilder
[src]
fn clone(&self) -> GzBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for GzBuilder
[src]
impl Debug for GzBuilder
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,