pub struct Writer { /* private fields */ }
Expand description
Document writer
Implementations§
Trait Implementations§
Source§impl WriterTrait for DocWriter
impl WriterTrait for DocWriter
Source§fn new(
dst: &Path,
lang: LanguageTag<String>,
_size_limit: Option<u64>,
comp: Option<Comp>,
) -> Result<Self, Error>
fn new( dst: &Path, lang: LanguageTag<String>, _size_limit: Option<u64>, comp: Option<Comp>, ) -> Result<Self, Error>
Create a new Writer for provided language.
Files will be written at the root of the dst
file, and shouldn’t exceed size_limit
.
File stem is lang.to_string()
Source§fn write(&mut self, pieces: Vec<Document>) -> Result<(), Error>
fn write(&mut self, pieces: Vec<Document>) -> Result<(), Error>
writes the provided Documents. Uses [Writer::write_all] internally
type Item = Document
Auto Trait Implementations§
impl Freeze for DocWriter
impl !RefUnwindSafe for DocWriter
impl Send for DocWriter
impl !Sync for DocWriter
impl Unpin for DocWriter
impl !UnwindSafe for DocWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more