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§
Auto Trait Implementations§
impl<W> Freeze for WriteAdapter<W>where
W: Freeze,
impl<W> RefUnwindSafe for WriteAdapter<W>where
W: RefUnwindSafe,
impl<W> Send for WriteAdapter<W>where
W: Send,
impl<W> Sync for WriteAdapter<W>where
W: Sync,
impl<W> Unpin for WriteAdapter<W>where
W: Unpin,
impl<W> UnwindSafe for WriteAdapter<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more