[−][src]Struct detect_compression::DetectWriter
The Write
type writes to compressed or uncompressed file.
This writer detects compression algorithms from file name extension.
You must finalize
this writer.
Methods
impl DetectWriter
[src]
pub fn create<P: AsRef<Path>>(path: P, level: Level) -> Result<DetectWriter>
[src]
Create compressed or uncompressed file.
pub fn create_with_wrapper<P: AsRef<Path>, B: WriteWrapperBuilder>(
path: P,
level: Level,
builder: B
) -> Result<DetectWriter>
[src]
path: P,
level: Level,
builder: B
) -> Result<DetectWriter>
Create compressed or uncompressed file using wrapper type.
InnerWriteWrapper
is the wrapepr type's trait handles compressed byte stream.
For example, the size-accumulating wrapper enables you to calculate size of compressed output.
pub fn finalize(self) -> Result<()>
[src]
Finalize this writer.
Some encodings requires finalization.
Trait Implementations
impl Drop for DetectWriter
[src]
impl Write for DetectWriter
[src]
fn write(&mut self, bytes: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for DetectWriter
impl !Send for DetectWriter
impl !Sync for DetectWriter
impl Unpin for DetectWriter
impl !UnwindSafe for DetectWriter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,