#[non_exhaustive]pub struct SubjectAltNames {
pub dns_names: Vec<String>,
pub uris: Vec<String>,
pub email_addresses: Vec<String>,
pub ip_addresses: Vec<String>,
pub custom_sans: Vec<X509Extension>,
/* private fields */
}Expand description
SubjectAltNames corresponds to a more modern way of listing what the asserted identity is in a certificate (i.e., compared to the “common name” in the distinguished name).
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.dns_names: Vec<String>Contains only valid, fully-qualified host names.
uris: Vec<String>Contains only valid RFC 3986 URIs.
email_addresses: Vec<String>Contains only valid RFC 2822 E-mail addresses.
ip_addresses: Vec<String>Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
custom_sans: Vec<X509Extension>Contains additional subject alternative name values.
For each custom_san, the value field must contain an ASN.1 encoded
UTF8String.
Implementations§
Source§impl SubjectAltNames
impl SubjectAltNames
pub fn new() -> Self
Sourcepub fn set_dns_names<T, V>(self, v: T) -> Self
pub fn set_dns_names<T, V>(self, v: T) -> Self
Sourcepub fn set_email_addresses<T, V>(self, v: T) -> Self
pub fn set_email_addresses<T, V>(self, v: T) -> Self
Sets the value of email_addresses.
§Example
ⓘ
let x = SubjectAltNames::new().set_email_addresses(["a", "b", "c"]);Sourcepub fn set_ip_addresses<T, V>(self, v: T) -> Self
pub fn set_ip_addresses<T, V>(self, v: T) -> Self
Sets the value of ip_addresses.
§Example
ⓘ
let x = SubjectAltNames::new().set_ip_addresses(["a", "b", "c"]);Sourcepub fn set_custom_sans<T, V>(self, v: T) -> Self
pub fn set_custom_sans<T, V>(self, v: T) -> Self
Sets the value of custom_sans.
§Example
ⓘ
use google_cloud_security_privateca_v1::model::X509Extension;
let x = SubjectAltNames::new()
.set_custom_sans([
X509Extension::default()/* use setters */,
X509Extension::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for SubjectAltNames
impl Clone for SubjectAltNames
Source§fn clone(&self) -> SubjectAltNames
fn clone(&self) -> SubjectAltNames
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 SubjectAltNames
impl Debug for SubjectAltNames
Source§impl Default for SubjectAltNames
impl Default for SubjectAltNames
Source§fn default() -> SubjectAltNames
fn default() -> SubjectAltNames
Returns the “default value” for a type. Read more
Source§impl Message for SubjectAltNames
impl Message for SubjectAltNames
Source§impl PartialEq for SubjectAltNames
impl PartialEq for SubjectAltNames
impl StructuralPartialEq for SubjectAltNames
Auto Trait Implementations§
impl Freeze for SubjectAltNames
impl RefUnwindSafe for SubjectAltNames
impl Send for SubjectAltNames
impl Sync for SubjectAltNames
impl Unpin for SubjectAltNames
impl UnwindSafe for SubjectAltNames
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