7 releases (breaking)
0.6.1 | Feb 20, 2024 |
---|---|
0.6.0 | Feb 20, 2024 |
0.5.0 | May 10, 2021 |
0.4.0 | Apr 14, 2021 |
0.1.0 | Mar 27, 2021 |
#307 in Embedded development
8KB
122 lines
A no_std
, no allocation, core::fmt::Write
able buffer.
Usage:
use e_write_buffer::WriteBuffer;
use std::fmt::Write as _;
fn main() {
let mut buffer: WriteBuffer<20> = WriteBuffer::new();
let x = 12;
write!(buffer, "{}", x).unwrap();
assert_eq!(buffer.as_str(), "12");
}
See also heapless::String
as an alternative.
lib.rs
:
A no_std
, no allocation, core::fmt::Write
able buffer.
Usage:
use e_write_buffer::WriteBuffer;
use std::fmt::Write as _;
fn main() {
let mut buffer: WriteBuffer<20> = WriteBuffer::new();
let x = 12;
write!(buffer, "{}", x).unwrap();
assert_eq!(buffer.as_str(), "12");
}