pub trait CounterStore {
type Error;
// Required methods
async fn load(&self, context: &[u8]) -> Result<u32, Self::Error>;
async fn store(&self, context: &[u8], value: u32) -> Result<(), Self::Error>;
async fn flush(&self) -> Result<(), Self::Error>;
}Expand description
Persistent frame-counter storage.
Required Associated Types§
Required Methods§
Sourceasync fn load(&self, context: &[u8]) -> Result<u32, Self::Error>
async fn load(&self, context: &[u8]) -> Result<u32, Self::Error>
Load the stored counter for context, or 0 if missing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.