#[non_exhaustive]pub enum ScSubjectAltName {
Dns(String),
Uri(String),
Email(String),
Ip(IpAddr),
}Available on crate feature
sc-tls only.Expand description
One Subject Alternative Name of a certificate, as written in it.
Names keep the certificate’s exact text, unescaped, for comparing
against configured values; nothing here checks their syntax. Compare for
exact equality, byte for byte: DNS case is not folded, a wildcard such as
*.example.com is returned as written and never expanded, names may hold
UTF-8 outside the IA5 range, and an IP name compares as an IpAddr, so
an IPv4-mapped IPv6 name is not equal to the IPv4 one. Don’t match by
suffix. Debug shows only the kind, never the name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Dns(String)
A DNS name (dNSName).
Uri(String)
A URI (uniformResourceIdentifier).
Email(String)
An email address (rfc822Name).
Ip(IpAddr)
An IPv4 or IPv6 address (iPAddress).
Trait Implementations§
Source§impl Clone for ScSubjectAltName
impl Clone for ScSubjectAltName
Source§fn clone(&self) -> ScSubjectAltName
fn clone(&self) -> ScSubjectAltName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScSubjectAltName
impl Debug for ScSubjectAltName
impl Eq for ScSubjectAltName
Source§impl Hash for ScSubjectAltName
impl Hash for ScSubjectAltName
Source§impl PartialEq for ScSubjectAltName
impl PartialEq for ScSubjectAltName
impl StructuralPartialEq for ScSubjectAltName
Auto Trait Implementations§
impl Freeze for ScSubjectAltName
impl RefUnwindSafe for ScSubjectAltName
impl Send for ScSubjectAltName
impl Sync for ScSubjectAltName
impl Unpin for ScSubjectAltName
impl UnsafeUnpin for ScSubjectAltName
impl UnwindSafe for ScSubjectAltName
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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