Struct GzHeader
struct GzHeader { ... }
A structure representing the header of a gzip stream.
The header can contain metadata about the file that was compressed, if present.
Implementations
impl GzHeader
fn filename(self: &Self) -> Option<&[u8]>Returns the
filenamefield of this gzip stream's header, if present.fn extra(self: &Self) -> Option<&[u8]>Returns the
extrafield of this gzip stream's header, if present.fn comment(self: &Self) -> Option<&[u8]>Returns the
commentfield of this gzip stream's header, if present.fn operating_system(self: &Self) -> u8Returns the
operating_systemfield of this gzip stream's header.There are predefined values for various operating systems. 255 means that the value is unknown.
fn mtime(self: &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,
mtimeis set to the time at which compression started.mtime= 0 means no time stamp is available.The usage of
mtimeis discouraged because of Year 2038 problem.fn mtime_as_datetime(self: &Self) -> Option<SystemTime>Returns the most recent modification time represented by a date-time type. Returns
Noneif 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
mtimefor more detail.
impl Clone for GzHeader
fn clone(self: &Self) -> GzHeader
impl Debug for GzHeader
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for GzHeader
fn default() -> GzHeader
impl Freeze for GzHeader
impl PartialEq for GzHeader
fn eq(self: &Self, other: &GzHeader) -> bool
impl RefUnwindSafe for GzHeader
impl Send for GzHeader
impl StructuralPartialEq for GzHeader
impl Sync for GzHeader
impl Unpin for GzHeader
impl UnsafeUnpin for GzHeader
impl UnwindSafe for GzHeader
impl<T> Any for GzHeader
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for GzHeader
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for GzHeader
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for GzHeader
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for GzHeader
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for GzHeader
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for GzHeader
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for GzHeader
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for GzHeader
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>