nsrb 1.0.0

Nifty Simple Ring Buffer (aka circular buffer) is a no_std library that provides 2 macros to easily create fixed circular buffer on the stack.
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented3 out of 3 items with examples
  • Size
  • Source code size: 34.02 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.14 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • NickelAngeStudio/nsrb
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • NickelAngeStudio

ubuntu-latest windows-latest macos-latest

nsrb

Nifty Simple Ring Buffer (aka circular buffer) is a no_std library that provides 2 macros to easily create fixed circular buffer on the stack.

See crate documentation for more informations.

Example

#[macro_use] extern crate nsrb;
 
#[derive(Clone, Copy, Debug)]
pub struct LogEntry {
    pub time_date : usize,
    pub entry : [char;256]
}
 
impl Default for LogEntry {
    fn default() -> Self { LogEntry { time_date : 0, entry : [' ';256] } }
 }

// Create a Ring buffer for LogEntry
nsrb::ring!(#[derive(Debug)] pub(crate) LogChecked[LogEntry; 10]);
 
fn main() {
    let log = LogChecked::new();
}