#[non_exhaustive]pub struct CertificateProperties {
pub subject_name: Option<String>,
pub issuer_name: Option<String>,
pub not_valid_before: Option<DateTime<Utc>>,
pub not_valid_after: Option<DateTime<Utc>>,
pub signature_algorithm_ref: Option<String>,
pub subject_public_key_ref: Option<String>,
pub certificate_format: Option<String>,
pub certificate_extension: Option<String>,
}Expand description
Properties of a digital certificate asset.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subject_name: Option<String>Certificate subject distinguished name.
issuer_name: Option<String>Certificate issuer distinguished name.
not_valid_before: Option<DateTime<Utc>>Start of validity period.
not_valid_after: Option<DateTime<Utc>>End of validity period.
signature_algorithm_ref: Option<String>Bom-ref of the signature algorithm component.
subject_public_key_ref: Option<String>Bom-ref of the subject public key component.
certificate_format: Option<String>Certificate format (e.g., “X.509”).
certificate_extension: Option<String>Certificate file extension (e.g., “pem”, “crt”, “der”).
Implementations§
Source§impl CertificateProperties
impl CertificateProperties
pub fn new() -> Self
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true if the certificate has expired.
Sourcepub fn is_expiring_soon(&self, days: u32) -> bool
pub fn is_expiring_soon(&self, days: u32) -> bool
Returns true if the certificate expires within the given number of days.
Sourcepub fn validity_days(&self) -> Option<i64>
pub fn validity_days(&self) -> Option<i64>
Returns remaining days until expiry, or None if no expiry date is set.
Returns negative values for already-expired certificates.
pub fn with_subject_name(self, name: String) -> Self
pub fn with_issuer_name(self, name: String) -> Self
pub fn with_not_valid_before(self, dt: DateTime<Utc>) -> Self
pub fn with_not_valid_after(self, dt: DateTime<Utc>) -> Self
pub fn with_signature_algorithm_ref(self, r: String) -> Self
pub fn with_subject_public_key_ref(self, r: String) -> Self
pub fn with_certificate_format(self, fmt: String) -> Self
pub fn with_certificate_extension(self, ext: String) -> Self
Trait Implementations§
Source§impl Clone for CertificateProperties
impl Clone for CertificateProperties
Source§fn clone(&self) -> CertificateProperties
fn clone(&self) -> CertificateProperties
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 CertificateProperties
impl Debug for CertificateProperties
Source§impl Default for CertificateProperties
impl Default for CertificateProperties
Source§impl<'de> Deserialize<'de> for CertificateProperties
impl<'de> Deserialize<'de> for CertificateProperties
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 CertificateProperties
impl PartialEq for CertificateProperties
Source§impl Serialize for CertificateProperties
impl Serialize for CertificateProperties
impl Eq for CertificateProperties
impl StructuralPartialEq for CertificateProperties
Auto Trait Implementations§
impl Freeze for CertificateProperties
impl RefUnwindSafe for CertificateProperties
impl Send for CertificateProperties
impl Sync for CertificateProperties
impl Unpin for CertificateProperties
impl UnsafeUnpin for CertificateProperties
impl UnwindSafe for CertificateProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more