pub struct MemStore { /* private fields */ }Expand description
An in-memory MessageStore. The default, and all a CSMS ever needs.
A Charging Station should swap in a store that survives a reboot.
Implementations§
Trait Implementations§
Source§impl MessageStore for MemStore
impl MessageStore for MemStore
Source§fn push(&mut self, entry: &QueuedCall) -> Result<Seq, StoreError>
fn push(&mut self, entry: &QueuedCall) -> Result<Seq, StoreError>
Appends a message, returning its sequence number.
Source§fn pending(&self) -> Result<Vec<(Seq, QueuedCall)>, StoreError>
fn pending(&self) -> Result<Vec<(Seq, QueuedCall)>, StoreError>
Every un-acknowledged message, oldest first. Read more
Source§fn ack(&mut self, seq: Seq) -> Result<(), StoreError>
fn ack(&mut self, seq: Seq) -> Result<(), StoreError>
Removes a message that has been delivered (or definitively abandoned).
Source§fn set_attempts(&mut self, seq: Seq, attempts: u32) -> Result<(), StoreError>
fn set_attempts(&mut self, seq: Seq, attempts: u32) -> Result<(), StoreError>
Records a further transmission attempt for a message that is still queued.
Auto Trait Implementations§
impl Forget for MemStore
impl Freeze for MemStore
impl RefUnwindSafe for MemStore
impl Send for MemStore
impl Sync for MemStore
impl Unpin for MemStore
impl UnsafeUnpin for MemStore
impl UnwindSafe for MemStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more