Struct fast_fmt::transform::Transformer
[−]
[src]
pub struct Transformer<T: Transform, W: Write> { /* fields omitted */ }
Transformation attached to a writer, transforming everything written into the writer.
Methods
impl<T: Transform, W: Write> Transformer<T, W>
[src]
fn new(transformation: T, writer: W) -> Self
Attaches transformation to the writer.
Trait Implementations
impl<T: Transform, W: Write> Write for Transformer<T, W>
[src]
type Error = W::Error
Type of error returned if write fails.
fn write_char(&mut self, c: char) -> Result<(), Self::Error>
Writes single char. Read more
fn write_str(&mut self, s: &str) -> Result<(), Self::Error>
Writes whole string. Read more
fn size_hint(&mut self, bytes: usize)
Hints that implementor should allocate enough space so that string containing bytes
UTF-8 bytes can be stored in it. Read more
fn uses_size_hint(&self) -> bool
Tells the user whether the size hint is actually used. This allows the user to skip calculation of the hint. Read more
fn transform<T: Transform>(self, transformation: T) -> Transformer<T, Self> where
Self: Sized,
Self: Sized,
Combinator for creating transformed writer.