pub trait Text {
fn write_escaped(
&self,
mode: TextEscape,
target: &mut impl Write
) -> Result<(), Error>;
fn write_raw(&self, target: &mut impl Write) -> Result<(), Error>;
fn write_base64(&self, target: &mut impl Write) -> Result<(), Error> { ... }
}
Expand description
Text to be written in XML.
This is a helper trait to allow passing different things to the various text writing methods and still retain reasonable performance.
Required methods
fn write_escaped(
&self,
mode: TextEscape,
target: &mut impl Write
) -> Result<(), Error>
fn write_escaped(
&self,
mode: TextEscape,
target: &mut impl Write
) -> Result<(), Error>
Write text escaped for the given mode to target
.