pub struct StackStr<const N: usize> { /* private fields */ }Expand description
A fixed-capacity string on the stack, for formatting labels without allocating.
Writes beyond the capacity fail with fmt::Error.
§Examples
use core::fmt::Write;
use ferrochart_core::text::StackStr;
let mut s = StackStr::<16>::new();
write!(s, "{:.2}", 3.14159).unwrap();
assert_eq!(s.as_str(), "3.14");Implementations§
Trait Implementations§
impl<const N: usize> Copy for StackStr<N>
Auto Trait Implementations§
impl<const N: usize> Forget for StackStr<N>
impl<const N: usize> Freeze for StackStr<N>
impl<const N: usize> Move for StackStr<N>
impl<const N: usize> RefUnwindSafe for StackStr<N>
impl<const N: usize> Send for StackStr<N>
impl<const N: usize> Sync for StackStr<N>
impl<const N: usize> Unpin for StackStr<N>
impl<const N: usize> UnsafeUnpin for StackStr<N>
impl<const N: usize> UnwindSafe for StackStr<N>
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