pub struct RdnSequence(pub Vec<RelativeDistinguishedName>);Expand description
X.501 RDNSequence as defined in RFC 5280 Section 4.1.2.4.
RDNSequence ::= SEQUENCE OF RelativeDistinguishedNameTuple Fields§
§0: Vec<RelativeDistinguishedName>Implementations§
Source§impl RdnSequence
impl RdnSequence
Sourcepub fn encode_from_string(s: &str) -> Result<Vec<u8>, Error>
👎Deprecated since 0.2.1: use RdnSequence::from_str(…)?.to_der()
pub fn encode_from_string(s: &str) -> Result<Vec<u8>, Error>
use RdnSequence::from_str(…)?.to_der()
Converts an RDNSequence string into an encoded RDNSequence.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Is this RdnSequence empty?
Trait Implementations§
Source§impl<'a> AsMut<Vec<RelativeDistinguishedName>> for RdnSequence
impl<'a> AsMut<Vec<RelativeDistinguishedName>> for RdnSequence
Source§fn as_mut(&mut self) -> &mut Vec<RelativeDistinguishedName>
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
impl<'a> AsRef<Vec<RelativeDistinguishedName>> for RdnSequence
Source§fn as_ref(&self) -> &Vec<RelativeDistinguishedName>
fn as_ref(&self) -> &Vec<RelativeDistinguishedName>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for RdnSequence
impl Clone for RdnSequence
Source§fn clone(&self) -> RdnSequence
fn clone(&self) -> RdnSequence
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 RdnSequence
impl Debug for RdnSequence
Source§impl<'a> DecodeValue<'a> for RdnSequence
impl<'a> DecodeValue<'a> for RdnSequence
Source§fn decode_value<R: Reader<'a>>(decoder: &mut R, header: Header) -> Result<Self>
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
impl Default for RdnSequence
Source§fn default() -> RdnSequence
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.
impl Display for RdnSequence
Serializes the structure according to the rules in RFC 4514.
Source§impl<'a> EncodeValue for RdnSequence
impl<'a> EncodeValue for RdnSequence
Source§impl<'a> FixedTag for RdnSequence
impl<'a> FixedTag for RdnSequence
Source§impl<'a> From<RdnSequence> for Vec<RelativeDistinguishedName>
impl<'a> From<RdnSequence> for Vec<RelativeDistinguishedName>
Source§fn from(value: RdnSequence) -> Self
fn from(value: RdnSequence) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Vec<RelativeDistinguishedName>> for RdnSequence
impl<'a> From<Vec<RelativeDistinguishedName>> for RdnSequence
Source§fn from(value: Vec<RelativeDistinguishedName>) -> Self
fn from(value: Vec<RelativeDistinguishedName>) -> Self
Converts to this type from the input type.
Source§impl FromStr for RdnSequence
Parse an RdnSequence string.
impl FromStr for RdnSequence
Parse an RdnSequence string.
Follows the rules in RFC 4514.
Source§impl PartialEq for RdnSequence
impl PartialEq for RdnSequence
Source§fn eq(&self, other: &RdnSequence) -> bool
fn eq(&self, other: &RdnSequence) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a> ValueOrd for RdnSequence
impl<'a> ValueOrd for RdnSequence
impl Eq for RdnSequence
impl StructuralPartialEq for RdnSequence
Auto Trait Implementations§
impl Freeze for RdnSequence
impl RefUnwindSafe for RdnSequence
impl Send for RdnSequence
impl Sync for RdnSequence
impl Unpin for RdnSequence
impl UnsafeUnpin for RdnSequence
impl UnwindSafe for RdnSequence
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
§impl<'a, T> Choice<'a> for Twhere
T: Decode<'a> + FixedTag,
impl<'a, T> Choice<'a> for Twhere
T: Decode<'a> + FixedTag,
§fn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided [
Tag] decodable as a variant of this CHOICE?Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
§impl<T> DerOrd for Twhere
T: EncodeValue + ValueOrd + Tagged,
impl<T> DerOrd for Twhere
T: EncodeValue + ValueOrd + Tagged,
§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided [Writer].
§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
§fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>
fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>
Encode this message as ASN.1 DER, appending it to the provided
byte vector.