pub struct MatterTime(pub u32);Expand description
A Matter time value: seconds since 2000-01-01T00:00:00Z, wrapping
as a u32 (the spec’s wire-native representation).
MatterTime(0) carries a special meaning of “no expiry” for
certificate not_after fields; see MatterTime::NO_EXPIRY.
Tuple Fields§
§0: u32Implementations§
Source§impl MatterTime
impl MatterTime
Sourcepub const NO_EXPIRY: MatterTime
pub const NO_EXPIRY: MatterTime
Sentinel meaning “no expiry” for certificate not_after.
Sourcepub fn from_unix_secs(unix: u64) -> MatterTime
pub fn from_unix_secs(unix: u64) -> MatterTime
Convert from Unix seconds. Saturates at u32::MAX on overflow.
Unix times before the Matter epoch saturate to MatterTime(0).
Sourcepub fn to_unix_secs(self) -> u64
pub fn to_unix_secs(self) -> u64
Convert to Unix seconds.
Trait Implementations§
Source§impl Clone for MatterTime
impl Clone for MatterTime
Source§fn clone(&self) -> MatterTime
fn clone(&self) -> MatterTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MatterTime
Source§impl Debug for MatterTime
impl Debug for MatterTime
impl Eq for MatterTime
Source§impl Hash for MatterTime
impl Hash for MatterTime
Source§impl Ord for MatterTime
impl Ord for MatterTime
Source§fn cmp(&self, other: &MatterTime) -> Ordering
fn cmp(&self, other: &MatterTime) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MatterTime
impl PartialEq for MatterTime
Source§impl PartialOrd for MatterTime
impl PartialOrd for MatterTime
impl StructuralPartialEq for MatterTime
Auto Trait Implementations§
impl Freeze for MatterTime
impl RefUnwindSafe for MatterTime
impl Send for MatterTime
impl Sync for MatterTime
impl Unpin for MatterTime
impl UnsafeUnpin for MatterTime
impl UnwindSafe for MatterTime
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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