pub struct KeyPackageLifetime {
pub not_before: u64,
pub not_after: u64,
}
Fields§
§not_before: u64
§not_after: u64
Implementations§
Source§impl KeyPackageLifetime
impl KeyPackageLifetime
pub const LIFETIME_WIGGLE_ROOM: u64 = 50_400u64
pub const MAX_LEAF_NODE_ACCEPTABLE_RANGE: u64 = 8_035_200u64
Available on non-crate feature
test-vectors
only.Sourcepub fn validate_range(&self) -> bool
pub fn validate_range(&self) -> bool
Validate if the range presented by not_before
and not_after
is within an acceptable range
This is currently statically configured to be 3 months as per the spec recommendation
Sourcepub fn validate_expiration(&self) -> bool
pub fn validate_expiration(&self) -> bool
Validate if the KeyPackageLifetime’s bounds are around now
Trait Implementations§
Source§impl Clone for KeyPackageLifetime
impl Clone for KeyPackageLifetime
Source§fn clone(&self) -> KeyPackageLifetime
fn clone(&self) -> KeyPackageLifetime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeyPackageLifetime
impl Debug for KeyPackageLifetime
Source§impl Default for KeyPackageLifetime
impl Default for KeyPackageLifetime
Source§impl<'de> Deserialize<'de> for KeyPackageLifetime
impl<'de> Deserialize<'de> for KeyPackageLifetime
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
Source§impl Deserialize for KeyPackageLifetime
impl Deserialize for KeyPackageLifetime
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the
bytes
from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl PartialEq for KeyPackageLifetime
impl PartialEq for KeyPackageLifetime
Source§impl Serialize for &KeyPackageLifetime
impl Serialize for &KeyPackageLifetime
Source§impl Serialize for KeyPackageLifetime
impl Serialize for KeyPackageLifetime
Source§impl Serialize for KeyPackageLifetime
impl Serialize for KeyPackageLifetime
Source§impl Size for &KeyPackageLifetime
impl Size for &KeyPackageLifetime
fn tls_serialized_len(&self) -> usize
Source§impl Size for KeyPackageLifetime
impl Size for KeyPackageLifetime
fn tls_serialized_len(&self) -> usize
impl Copy for KeyPackageLifetime
impl Eq for KeyPackageLifetime
impl StructuralPartialEq for KeyPackageLifetime
Auto Trait Implementations§
impl Freeze for KeyPackageLifetime
impl RefUnwindSafe for KeyPackageLifetime
impl Send for KeyPackageLifetime
impl Sync for KeyPackageLifetime
impl Unpin for KeyPackageLifetime
impl UnwindSafe for KeyPackageLifetime
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