Struct warc::WarcWriter
source · [−]pub struct WarcWriter<W> { /* private fields */ }Expand description
A writer which writes records to an output stream.
Implementations
sourceimpl<W: Write> WarcWriter<W>
impl<W: Write> WarcWriter<W>
sourceimpl<W: Write> WarcWriter<BufWriter<W>>
impl<W: Write> WarcWriter<BufWriter<W>>
sourcepub fn into_inner(self) -> Result<W, IntoInnerError<BufWriter<W>>>
pub fn into_inner(self) -> Result<W, IntoInnerError<BufWriter<W>>>
Consume this writer and return the inner writer.
Flushing Compressed Data Streams
This method is necessary to be called at the end of a GZIP-compressed stream. An extra call is needed to flush the buffer of data, and write a trailer to the output stream.
ⓘ
let gzip_stream = writer.into_inner()?;
gzip_writer.finish().into_result()?;sourceimpl WarcWriter<BufWriter<File>>
impl WarcWriter<BufWriter<File>>
sourceimpl WarcWriter<BufWriter<GzipWriter<File>>>
impl WarcWriter<BufWriter<GzipWriter<File>>>
sourcepub fn from_path_gzip<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_path_gzip<P: AsRef<Path>>(path: P) -> Result<Self>
Create a new writer which writes to a GZIP-compressed file.
Auto Trait Implementations
impl<W> RefUnwindSafe for WarcWriter<W> where
W: RefUnwindSafe,
impl<W> Send for WarcWriter<W> where
W: Send,
impl<W> Sync for WarcWriter<W> where
W: Sync,
impl<W> Unpin for WarcWriter<W> where
W: Unpin,
impl<W> UnwindSafe for WarcWriter<W> where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more