Trait pulldown_cmark_escape::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

§

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,

§

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,

§

type Error = Error

source§

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

§

type Error = Error