Struct rpki::repository::x509::Validity
source · pub struct Validity { /* private fields */ }
Implementations§
source§impl Validity
impl Validity
pub fn new(not_before: Time, not_after: Time) -> Self
pub fn from_duration(duration: Duration) -> Self
pub fn from_secs(secs: i64) -> Self
pub fn not_before(self) -> Time
pub fn not_after(self) -> Time
pub fn trim(self, other: Self) -> Self
pub fn take_from<S: Source>( cons: &mut Constructed<'_, S> ) -> Result<Self, DecodeError<S::Error>>
pub fn verify(self) -> Result<(), ValidityPeriodError>
pub fn verify_at(self, now: Time) -> Result<(), ValidityPeriodError>
pub fn encode(self) -> impl Values
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for Validity
impl<'arbitrary> Arbitrary<'arbitrary> for Validity
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl<'de> Deserialize<'de> for Validity
impl<'de> Deserialize<'de> for Validity
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 PartialEq for Validity
impl PartialEq for Validity
impl Copy for Validity
impl Eq for Validity
impl StructuralEq for Validity
impl StructuralPartialEq for Validity
Auto Trait Implementations§
impl RefUnwindSafe for Validity
impl Send for Validity
impl Sync for Validity
impl Unpin for Validity
impl UnwindSafe for Validity
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