[−][src]Struct flate2::GzHeader
A structure representing the header of a gzip stream.
The header can contain metadata about the file that was compressed, if present.
Methods
impl GzHeader[src]
impl GzHeaderpub fn filename(&self) -> Option<&[u8]>[src]
pub fn filename(&self) -> Option<&[u8]>Returns the filename field of this gzip stream's header, if present.
pub fn extra(&self) -> Option<&[u8]>[src]
pub fn extra(&self) -> Option<&[u8]>Returns the extra field of this gzip stream's header, if present.
pub fn comment(&self) -> Option<&[u8]>[src]
pub fn comment(&self) -> Option<&[u8]>Returns the comment field of this gzip stream's header, if present.
pub fn operating_system(&self) -> u8[src]
pub fn operating_system(&self) -> u8Returns the operating_system field of this gzip stream's header.
There are predefined values for various operating systems. 255 means that the value is unknown.
pub fn mtime(&self) -> u32[src]
pub fn mtime(&self) -> u32This gives the most recent modification time of the original file being compressed.
The time is in Unix format, i.e., seconds since 00:00:00 GMT, Jan. 1, 1970.
(Note that this may cause problems for MS-DOS and other systems that use local
rather than Universal time.) If the compressed data did not come from a file,
mtime is set to the time at which compression started.
mtime = 0 means no time stamp is available.
The usage of mtime is discouraged because of Year 2038 problem.
pub fn mtime_as_datetime(&self) -> Option<SystemTime>[src]
pub fn mtime_as_datetime(&self) -> Option<SystemTime>Returns the most recent modification time represented by a date-time type.
Returns None if the value of the underlying counter is 0,
indicating no time stamp is available.
The time is measured as seconds since 00:00:00 GMT, Jan. 1 1970.
See mtime for more detail.
Trait Implementations
impl PartialEq for GzHeader[src]
impl PartialEq for GzHeaderfn eq(&self, other: &GzHeader) -> bool[src]
fn eq(&self, other: &GzHeader) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &GzHeader) -> bool[src]
fn ne(&self, other: &GzHeader) -> boolThis method tests for !=.
impl Clone for GzHeader[src]
impl Clone for GzHeaderfn clone(&self) -> GzHeader[src]
fn clone(&self) -> GzHeaderReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for GzHeader[src]
impl Debug for GzHeaderAuto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T[src]
fn borrow(&self) -> &TImmutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more