| Crates.io | embytes-buffer |
| lib.rs | embytes-buffer |
| version | 0.2.0 |
| created_at | 2025-05-22 08:50:33.845848+00 |
| updated_at | 2025-08-12 12:49:00.165086+00 |
| description | Crate for an embedded bytes buffer |
| homepage | https://github.com/siemtim-dev/embytes-buffer |
| repository | https://github.com/siemtim-dev/embytes-buffer.git |
| max_upload_size | |
| id | 1684913 |
| size | 62,017 |
This libray contains a buffer implementation that is made for no_std environments.
The buffer is backed ba any bytes source that satisfies AsMut<[u8]> + AsRef<[u8]>.
the buffer implemnts embedded_io::Read, embedded_io::Write, std::io::Read and std::io::Write.
// Create a new buffern with an array as byte source on the stack
let mut buffer = new_stack_buffer::<1024>();
// Write some bytes to buffer
buffer.write_all("hello world".as_bytes()).unwrap();
// read the bytes again
let mut buf = [0; 128];
let bytes_read = buffer.read(&mut buf).unwrap();
See examples directory for more examples