smoltcp/storage/
mod.rs

1/*! Specialized containers.
2
3The `storage` module provides containers for use in other modules.
4The containers support both pre-allocated memory, without the `std`
5or `alloc` crates being available, and heap-allocated memory.
6*/
7
8mod assembler;
9mod packet_buffer;
10mod ring_buffer;
11
12pub use self::assembler::Assembler;
13pub use self::packet_buffer::{PacketBuffer, PacketMetadata};
14pub use self::ring_buffer::RingBuffer;
15
16/// A trait for setting a value to a known state.
17///
18/// In-place analog of Default.
19pub trait Resettable {
20    fn reset(&mut self);
21}
22
23/// Error returned when enqueuing into a full buffer.
24#[derive(Debug, PartialEq, Eq, Clone, Copy)]
25#[cfg_attr(feature = "defmt", derive(defmt::Format))]
26pub struct Full;
27
28/// Error returned when dequeuing from an empty buffer.
29#[derive(Debug, PartialEq, Eq, Clone, Copy)]
30#[cfg_attr(feature = "defmt", derive(defmt::Format))]
31pub struct Empty;