pub struct WriteAdapter<W>(pub W) 
where
    W: Write
;
Expand description

An adapter struct allowing to use ufmt on types which implement core::fmt::Write

For example:

use ufmt::uwrite;
use ufmt_write::uWrite;
use ufmt_utils::WriteAdapter;

let fancy_number: u8 = 42;

let mut s = String::new();
uwrite!(WriteAdapter(&mut s), "{:?}", fancy_number);

Tuple Fields

0: W

Trait Implementations

The error associated to this writer

Writes a char into this writer, returning whether the write succeeded. Read more

Writes a string slice into this writer, returning whether the write succeeded. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.