x509_cert::name

Type Alias Name

Source
pub type Name = RdnSequence;
Expand description

X.501 Name as defined in RFC 5280 Section 4.1.2.4. X.501 Name is used to represent distinguished names.

Name ::= CHOICE { rdnSequence  RDNSequence }

Aliased Type§

struct Name(pub Vec<RelativeDistinguishedName>);

Fields§

§0: Vec<RelativeDistinguishedName>

Implementations

Source§

impl RdnSequence

Source

pub fn encode_from_string(s: &str) -> Result<Vec<u8>, Error>

👎Deprecated since 0.2.1: use RdnSequence::from_str(…)?.to_der()

Converts an RDNSequence string into an encoded RDNSequence.

Source

pub fn is_empty(&self) -> bool

Is this RdnSequence empty?

Trait Implementations

Source§

impl<'a> AsMut<Vec<RelativeDistinguishedName>> for RdnSequence

Source§

fn as_mut(&mut self) -> &mut Vec<RelativeDistinguishedName>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<'a> AsRef<Vec<RelativeDistinguishedName>> for RdnSequence

Source§

fn as_ref(&self) -> &Vec<RelativeDistinguishedName>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for RdnSequence

Source§

fn clone(&self) -> RdnSequence

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RdnSequence

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> DecodeValue<'a> for RdnSequence

Source§

fn decode_value<R: Reader<'a>>(decoder: &mut R, header: Header) -> Result<Self>

Attempt to decode this message using the provided Reader.
Source§

impl Default for RdnSequence

Source§

fn default() -> RdnSequence

Returns the “default value” for a type. Read more
Source§

impl Display for RdnSequence

Serializes the structure according to the rules in RFC 4514.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> EncodeValue for RdnSequence

Source§

fn encode_value(&self, encoder: &mut impl Writer) -> Result<()>

Encode value (sans [Tag]+Length header) as ASN.1 DER using the provided Writer.
Source§

fn value_len(&self) -> Result<Length>

Compute the length of this value (sans [Tag]+Length header) when encoded as ASN.1 DER.
Source§

fn header(&self) -> Result<Header, Error>
where Self: Tagged,

Get the Header used to encode this value.
Source§

impl<'a> FixedTag for RdnSequence

Source§

const TAG: Tag = <Vec<RelativeDistinguishedName> as ::der::FixedTag>::TAG

ASN.1 tag
Source§

impl<'a> From<Vec<RelativeDistinguishedName>> for RdnSequence

Source§

fn from(value: Vec<RelativeDistinguishedName>) -> Self

Converts to this type from the input type.
Source§

impl FromStr for RdnSequence

Parse an RdnSequence string.

Follows the rules in RFC 4514.

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for RdnSequence

Source§

fn eq(&self, other: &RdnSequence) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> ValueOrd for RdnSequence

Source§

fn value_cmp(&self, other: &Self) -> Result<Ordering>

Return an Ordering between value portion of TLV-encoded self and other when serialized as ASN.1 DER.
Source§

impl Eq for RdnSequence

Source§

impl StructuralPartialEq for RdnSequence