#[non_exhaustive]
pub struct Asn1Subject {
Show 15 fields pub country: Option<String>, pub organization: Option<String>, pub organizational_unit: Option<String>, pub distinguished_name_qualifier: Option<String>, pub state: Option<String>, pub common_name: Option<String>, pub serial_number: Option<String>, pub locality: Option<String>, pub title: Option<String>, pub surname: Option<String>, pub given_name: Option<String>, pub initials: Option<String>, pub pseudonym: Option<String>, pub generation_qualifier: Option<String>, pub custom_attributes: Option<Vec<CustomAttribute>>,
}
Expand description

Contains information about the certificate subject. The Subject field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The Subject must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate.

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.
country: Option<String>

Two-digit code that specifies the country in which the certificate subject located.

organization: Option<String>

Legal name of the organization with which the certificate subject is affiliated.

organizational_unit: Option<String>

A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.

distinguished_name_qualifier: Option<String>

Disambiguating information for the certificate subject.

state: Option<String>

State in which the subject of the certificate is located.

common_name: Option<String>

For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.

Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.

serial_number: Option<String>

The certificate serial number.

locality: Option<String>

The locality (such as a city or town) in which the certificate subject is located.

title: Option<String>

A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.

surname: Option<String>

Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.

given_name: Option<String>

First name.

initials: Option<String>

Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.

pseudonym: Option<String>

Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.

generation_qualifier: Option<String>

Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.

custom_attributes: Option<Vec<CustomAttribute>>

Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID).

Custom attributes cannot be used in combination with standard attributes.

Implementations

Two-digit code that specifies the country in which the certificate subject located.

Legal name of the organization with which the certificate subject is affiliated.

A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.

Disambiguating information for the certificate subject.

State in which the subject of the certificate is located.

For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.

Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.

The certificate serial number.

The locality (such as a city or town) in which the certificate subject is located.

A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.

Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.

First name.

Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.

Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.

Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.

Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID).

Custom attributes cannot be used in combination with standard attributes.

Creates a new builder-style object to manufacture Asn1Subject

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more