#[non_exhaustive]pub struct SubjectDescription {
pub subject: Option<Subject>,
pub subject_alt_name: Option<SubjectAltNames>,
pub hex_serial_number: String,
pub lifetime: Option<Duration>,
pub not_before_time: Option<Timestamp>,
pub not_after_time: Option<Timestamp>,
/* private fields */
}Expand description
These values describe fields in an issued X.509 certificate such as the distinguished name, subject alternative names, serial number, and lifetime.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subject: Option<Subject>Contains distinguished name fields such as the common name, location and / organization.
subject_alt_name: Option<SubjectAltNames>The subject alternative name fields.
hex_serial_number: StringThe serial number encoded in lowercase hexadecimal.
lifetime: Option<Duration>For convenience, the actual lifetime of an issued certificate.
not_before_time: Option<Timestamp>The time at which the certificate becomes valid.
not_after_time: Option<Timestamp>The time after which the certificate is expired. Per RFC 5280, the validity period for a certificate is the period of time from not_before_time through not_after_time, inclusive. Corresponds to ‘not_before_time’ + ‘lifetime’ - 1 second.
Implementations§
Source§impl SubjectDescription
impl SubjectDescription
pub fn new() -> Self
Sourcepub fn set_subject<T>(self, v: T) -> Self
pub fn set_subject<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_subject<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subject<T>(self, v: Option<T>) -> Self
Sourcepub fn set_subject_alt_name<T>(self, v: T) -> Selfwhere
T: Into<SubjectAltNames>,
pub fn set_subject_alt_name<T>(self, v: T) -> Selfwhere
T: Into<SubjectAltNames>,
Sets the value of subject_alt_name.
§Example
use google_cloud_security_privateca_v1::model::SubjectAltNames;
let x = SubjectDescription::new().set_subject_alt_name(SubjectAltNames::default()/* use setters */);Sourcepub fn set_or_clear_subject_alt_name<T>(self, v: Option<T>) -> Selfwhere
T: Into<SubjectAltNames>,
pub fn set_or_clear_subject_alt_name<T>(self, v: Option<T>) -> Selfwhere
T: Into<SubjectAltNames>,
Sets or clears the value of subject_alt_name.
§Example
use google_cloud_security_privateca_v1::model::SubjectAltNames;
let x = SubjectDescription::new().set_or_clear_subject_alt_name(Some(SubjectAltNames::default()/* use setters */));
let x = SubjectDescription::new().set_or_clear_subject_alt_name(None::<SubjectAltNames>);Sourcepub fn set_hex_serial_number<T: Into<String>>(self, v: T) -> Self
pub fn set_hex_serial_number<T: Into<String>>(self, v: T) -> Self
Sets the value of hex_serial_number.
§Example
let x = SubjectDescription::new().set_hex_serial_number("example");Sourcepub fn set_lifetime<T>(self, v: T) -> Self
pub fn set_lifetime<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_lifetime<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_lifetime<T>(self, v: Option<T>) -> Self
Sourcepub fn set_not_before_time<T>(self, v: T) -> Self
pub fn set_not_before_time<T>(self, v: T) -> Self
Sets the value of not_before_time.
§Example
use wkt::Timestamp;
let x = SubjectDescription::new().set_not_before_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_not_before_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_not_before_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of not_before_time.
§Example
use wkt::Timestamp;
let x = SubjectDescription::new().set_or_clear_not_before_time(Some(Timestamp::default()/* use setters */));
let x = SubjectDescription::new().set_or_clear_not_before_time(None::<Timestamp>);Sourcepub fn set_not_after_time<T>(self, v: T) -> Self
pub fn set_not_after_time<T>(self, v: T) -> Self
Sets the value of not_after_time.
§Example
use wkt::Timestamp;
let x = SubjectDescription::new().set_not_after_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_not_after_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_not_after_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of not_after_time.
§Example
use wkt::Timestamp;
let x = SubjectDescription::new().set_or_clear_not_after_time(Some(Timestamp::default()/* use setters */));
let x = SubjectDescription::new().set_or_clear_not_after_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for SubjectDescription
impl Clone for SubjectDescription
Source§fn clone(&self) -> SubjectDescription
fn clone(&self) -> SubjectDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more