Trait

core::fmt::Format

source
forall T, W.
trait Format {
    /// Writes `value` to `out`, handing both back.
    fn format(value: T, out: W) -> (T, W);
}

Formatting of a T into any writer W, handing the value back.

Methods

method formatsource

fn format(value: T, out: W) -> (T, W);

Writes value to out, handing both back.

Implementors

instance Format[Error, W]source

forall W where Writer[W].
instance Format[Error, W] { ... }

In std::io.

An error formats as its description and its errno: No such file or directory (error 2).

instance Format[u8, W]source

forall W where Writer[W].
instance Format[u8, W] { ... }

In core::fmt.

A u8 formats as its decimal digits.

instance Format[u16, W]source

forall W where Writer[W].
instance Format[u16, W] { ... }

In core::fmt.

A u16 formats as its decimal digits.

instance Format[u32, W]source

forall W where Writer[W].
instance Format[u32, W] { ... }

In core::fmt.

A u32 formats as its decimal digits.

instance Format[u64, W]source

forall W where Writer[W].
instance Format[u64, W] { ... }

In core::fmt.

A u64 formats as its decimal digits.

instance Format[usize, W]source

forall W where Writer[W].
instance Format[usize, W] { ... }

In core::fmt.

A usize formats as its decimal digits.

instance Format[i8, W]source

forall W where Writer[W].
instance Format[i8, W] { ... }

In core::fmt.

A i8 formats as its decimal digits, after - when negative.

instance Format[i16, W]source

forall W where Writer[W].
instance Format[i16, W] { ... }

In core::fmt.

A i16 formats as its decimal digits, after - when negative.

instance Format[i32, W]source

forall W where Writer[W].
instance Format[i32, W] { ... }

In core::fmt.

A i32 formats as its decimal digits, after - when negative.

instance Format[i64, W]source

forall W where Writer[W].
instance Format[i64, W] { ... }

In core::fmt.

A i64 formats as its decimal digits, after - when negative.

instance Format[isize, W]source

forall W where Writer[W].
instance Format[isize, W] { ... }

In core::fmt.

A isize formats as its decimal digits, after - when negative.

instance Format[f64, W]source

forall W where Writer[W].
instance Format[f64, W] { ... }

In core::fmt.

An f64 formats as the shortest decimal that reads back as it (write_f64).

instance Format[f32, W]source

forall W where Writer[W].
instance Format[f32, W] { ... }

In core::fmt.

An f32 formats as the shortest decimal that reads back as it (write_f32).

instance Format[bool, W]source

forall W where Writer[W].
instance Format[bool, W] { ... }

In core::fmt.

A bool formats as true or false.

instance Format[Readable[C, S], W]source

forall C, S, W where ReadBytes[C, S], Copy[S], Writer[W].
instance Format[Readable[C, S], W] { ... }

In core::fmt.

A borrowed byte view formats as its bytes, read through its capability.

instance Format[Str['r], ReadingWriter![W, C]]source

forall W, C, 'r where Writer[W], ReadBytes[C, Str['r]].
instance Format[Str['r], ReadingWriter![W, C]] { ... }

In core::fmt.

Text formats as its bytes, read through the writer's context: f"{name}".write(&cx, out) with name: Str['k]. A Str['static] in an f-string is written directly, as literal text is.

instance Format[Buffer!, W]source

forall W where Writer[W].
instance Format[Buffer!, W] { ... }

In alloc::fmt.

Formats an owned buffer as its contents. The buffer is handed back, not freed: an f-string formats a linear value only through {&name}.