Struct format_no_std::WriteTo
source · pub struct WriteTo<'a> { /* private fields */ }
Expand description
A struct representing a writer that appends formatted data to a byte buffer.
Implementations§
source§impl<'a> WriteTo<'a>
impl<'a> WriteTo<'a>
sourcepub fn new(buf: &'a mut [u8]) -> Self
pub fn new(buf: &'a mut [u8]) -> Self
Constructs a new WriteTo
instance wrapping the provided byte buffer.
sourcepub fn as_str(self) -> Option<&'a str>
pub fn as_str(self) -> Option<&'a str>
Converts the written portion of the buffer into a string slice, if possible.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WriteTo<'a>
impl<'a> RefUnwindSafe for WriteTo<'a>
impl<'a> Send for WriteTo<'a>
impl<'a> Sync for WriteTo<'a>
impl<'a> Unpin for WriteTo<'a>
impl<'a> !UnwindSafe for WriteTo<'a>
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