sequence_buffer 0.1.0

Sequence buffer data structure implementation
Documentation
  • Coverage
  • 0%
    0 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 4.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • you-think-you-are-special

Sequence buffer

Sequence buffer data structure implementation

Properties:

  • Constant time insertion for a given number (inserts may be random)
  • Constant time query for a given number
  • Constant time access for the data stored for a given number
  • Constant time removal of entries

Examples

  let mut buf = SequenceBuffer::new(1);
  
  buf.insert(DataStub, 543535);
  assert!(buf.exists(543535));
 
  buf.insert(DataStub, 2535436);
  buf.remove(2535436);
  assert!(!buf.exists(2535436));

Use cases

  • Ack system in netwrok protocol