Struct toad_common::Writable
source · [−]Expand description
A writeable byte buffer
(allows using write! and format! without allocations)
use core::fmt::Write as _;
use toad_common::{Array, Writable};
let mut faux_string = Writable::<tinyvec::ArrayVec<[u8; 16]>>::default();
write!(faux_string, "{}", 123).unwrap();
assert_eq!(faux_string.as_str(), "123");Implementations
Trait Implementations
sourceimpl<A: Array<Item = u8>> Write for Writable<A>
impl<A: Array<Item = u8>> Write for Writable<A>
impl<A: Copy + Array<Item = u8>> Copy for Writable<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for Writable<A>where
A: RefUnwindSafe,
impl<A> Send for Writable<A>where
A: Send,
impl<A> Sync for Writable<A>where
A: Sync,
impl<A> Unpin for Writable<A>where
A: Unpin,
impl<A> UnwindSafe for Writable<A>where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more