Struct libflate::finish::AutoFinishUnchecked[][src]

pub struct AutoFinishUnchecked<T: Complete> { /* fields omitted */ }

A wrapper struct that completes the processing of the underlying instance when drops.

This calls Complete:::complete method of T when drops.

Note that this ignores the result of the invocation of Complete::complete(T).

Methods

impl<T: Complete> AutoFinishUnchecked<T>
[src]

Makes a new AutoFinishUnchecked instance.

Examples

use std::io;
use libflate::finish::AutoFinishUnchecked;
use libflate::gzip::Encoder;

let plain = b"Hello World!";
let mut buf = Vec::new();
let mut encoder = AutoFinishUnchecked::new(Encoder::new(&mut buf).unwrap());
io::copy(&mut &plain[..], &mut encoder).unwrap();

Unwraps this AutoFinishUnchecked instance, returning the underlying instance.

Trait Implementations

impl<T: Debug + Complete> Debug for AutoFinishUnchecked<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Complete> Drop for AutoFinishUnchecked<T>
[src]

Executes the destructor for this type. Read more

impl<T: Complete> Deref for AutoFinishUnchecked<T>
[src]

The resulting type after dereferencing.

Dereferences the value.

impl<T: Complete> DerefMut for AutoFinishUnchecked<T>
[src]

Mutably dereferences the value.

impl<T: Complete + Write> Write for AutoFinishUnchecked<T>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more

Auto Trait Implementations

impl<T> Send for AutoFinishUnchecked<T> where
    T: Send

impl<T> Sync for AutoFinishUnchecked<T> where
    T: Sync