pulldown_cmark_escape

Trait StrWrite

Source
pub trait StrWrite {
    type Error;

    // Required methods
    fn write_str(&mut self, s: &str) -> Result<(), Self::Error>;
    fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Self::Error>;
}
Expand description

Trait that allows writing string slices. This is basically an extension of std::io::Write in order to include String.

Required Associated Types§

Required Methods§

Source

fn write_str(&mut self, s: &str) -> Result<(), Self::Error>

Source

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Self::Error>

Implementations on Foreign Types§

Source§

impl StrWrite for String

Source§

type Error = Error

Source§

fn write_str(&mut self, s: &str) -> Result

Source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result

Source§

impl<W> StrWrite for &mut W
where W: StrWrite,

Source§

type Error = <W as StrWrite>::Error

Source§

fn write_str(&mut self, s: &str) -> Result<(), Self::Error>

Source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Self::Error>

Implementors§

Source§

impl<W> StrWrite for FmtWriter<W>
where W: Write,

Source§

impl<W> StrWrite for IoWriter<W>
where W: Write,