pub struct ContentLineWriter<W: Write> { /* private fields */ }Expand description
Writer which encodes content lines into a iCalendar or vCard files.
This writer takes care of folding lines and the lower-level details of formatting content
lines. Optionally, it can validate the syntax of the input data. See
ContentLineWriter::start_line.
This writer makes frequent and small calls to the output’s std::io::Write::write. It is
generally advised to use std::io::BufWriter or a similar buffering writer.
Implementations§
Source§impl<W: Write> ContentLineWriter<W>
impl<W: Write> ContentLineWriter<W>
Sourcepub fn new(output: W) -> ContentLineWriter<W>
pub fn new(output: W) -> ContentLineWriter<W>
Create a new instance which will write processed data into output.
Sourcepub fn start_line(self, name: &str) -> Result<LineWithName<W>>
pub fn start_line(self, name: &str) -> Result<LineWithName<W>>
Start a new line, with the given name.
The returned handle allows adding parameters and a value to this line before returning this writer instance.
§Errors
Returns an error if either the is invalid or if an IO error occurs.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Return the inner, wrapper output instance.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for ContentLineWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for ContentLineWriter<W>where
W: RefUnwindSafe,
impl<W> Send for ContentLineWriter<W>where
W: Send,
impl<W> Sync for ContentLineWriter<W>where
W: Sync,
impl<W> Unpin for ContentLineWriter<W>where
W: Unpin,
impl<W> UnwindSafe for ContentLineWriter<W>where
W: UnwindSafe,
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