Trait fast_fmt::transform::Transform [] [src]

pub trait Transform {
    fn transform_char<W: Write>(
        &self,
        writer: &mut W,
        c: char
    ) -> Result<(), W::Error>; fn transform_size_hint(&self, bytes: usize) -> usize; fn transform_str<W: Write>(
        &self,
        writer: &mut W,
        s: &str
    ) -> Result<(), W::Error> { ... } }

Represents a transformation of text to another text.

It abstracts transforming a single value and a whole input to the writer.

Required Methods

Writes transformed char into provided writer.

Calculates new size hint based on how transformation affects output size.

It should always be maximum of possible scenarios. If maximum can't be determined, the bytes value should be returned unchanged.

Provided Methods

Writes transformed string into provided writer.

Implementors