Struct

std::fmt::FixedWriter!

source

Re-exported from alloc::fmt::FixedWriter!.

struct FixedWriter! { ... }

A byte buffer that never grows past cap. The first write that does not fit marks it full; that write and every later one is dropped, so the contents are always a prefix of what was written.

Methods

method newsource

fn new(cap: usize) -> FixedWriter! { ... }

An empty writer that holds at most cap bytes.

method finishsource

fn finish(self) -> (Buffer!, Result[(), Full]) { ... }

The bytes written, and Full if any write was dropped.

Instances

instance Writer[FixedWriter!]source

instance Writer[FixedWriter!] { ... }

In std::fmt.

A fixed writer as a writer: bytes past its capacity are dropped.