pub struct DeliveryHistory(/* private fields */);Expand description
The recent states of one delivery, oldest first.
Implementations§
Source§impl DeliveryHistory
impl DeliveryHistory
Sourcepub const CAPACITY: usize = MAX_ENTRIES
pub const CAPACITY: usize = MAX_ENTRIES
How many transitions are kept before the oldest is forgotten.
pub const fn new() -> Self
Sourcepub fn recording(self, entry: DeliveryHistoryEntry) -> Self
pub fn recording(self, entry: DeliveryHistoryEntry) -> Self
Record one more transition, forgetting the oldest if full.
pub fn entries(&self) -> &[DeliveryHistoryEntry]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn last(&self) -> Option<DeliveryHistoryEntry>
pub fn last(&self) -> Option<DeliveryHistoryEntry>
The most recent transition, if there is one.
Trait Implementations§
Source§impl Clone for DeliveryHistory
impl Clone for DeliveryHistory
Source§impl Debug for DeliveryHistory
impl Debug for DeliveryHistory
Source§impl Default for DeliveryHistory
impl Default for DeliveryHistory
Source§impl<'de> Deserialize<'de> for DeliveryHistory
impl<'de> Deserialize<'de> for DeliveryHistory
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DeliveryHistory
Source§impl PartialEq for DeliveryHistory
impl PartialEq for DeliveryHistory
Source§impl Serialize for DeliveryHistory
impl Serialize for DeliveryHistory
impl StructuralPartialEq for DeliveryHistory
Auto Trait Implementations§
impl Freeze for DeliveryHistory
impl RefUnwindSafe for DeliveryHistory
impl Send for DeliveryHistory
impl Sync for DeliveryHistory
impl Unpin for DeliveryHistory
impl UnsafeUnpin for DeliveryHistory
impl UnwindSafe for DeliveryHistory
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