Trait writeable::Writeable[][src]

pub trait Writeable {
    fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result;

    fn write_len(&self) -> LengthHint { ... }
fn writeable_to_string(&self) -> String { ... } }
Expand description

Writeable is an alternative to std::fmt::Display with the addition of a length function.

Required methods

Writes bytes to the given sink. Errors from the sink are bubbled up.

Provided methods

Returns a hint for the number of bytes that will be written to the sink.

Override this method if it can be computed quickly.

Creates a new String with the data from this Writeable. Like ToString, but smaller and faster.

Not intended to be overriden.

Implementations on Foreign Types

Implementors