pub struct RelativeDistinguishedName(/* private fields */);Expand description
RelativeDistinguishedName as defined in RFC 5280 Section 4.1.2.4.
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValueNote that we follow the more common definition above. This technically differs from the definition in X.501, which is:
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndDistinguishedValue
AttributeTypeAndDistinguishedValue ::= SEQUENCE {
type ATTRIBUTE.&id ({SupportedAttributes}),
value ATTRIBUTE.&Type({SupportedAttributes}{@type}),
primaryDistinguished BOOLEAN DEFAULT TRUE,
valuesWithContext SET SIZE (1..MAX) OF SEQUENCE {
distingAttrValue [0] ATTRIBUTE.&Type ({SupportedAttributes}{@type}) OPTIONAL,
contextList SET SIZE (1..MAX) OF Context
} OPTIONAL
}Implementations§
Source§impl RelativeDistinguishedName
impl RelativeDistinguishedName
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Is this RelativeDistinguishedName empty?
Sourcepub fn iter(&self) -> impl Iterator<Item = &AttributeTypeAndValue>
pub fn iter(&self) -> impl Iterator<Item = &AttributeTypeAndValue>
Iterate over this RelativeDistinguishedName.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Length of this RelativeDistinguishedName.
Sourcepub fn insert(&mut self, item: AttributeTypeAndValue) -> Result<(), Error>
pub fn insert(&mut self, item: AttributeTypeAndValue) -> Result<(), Error>
Insert an AttributeTypeAndValue into this RelativeDistinguishedName. Must be unique.
Trait Implementations§
Source§impl<'a> AsMut<SetOfVec<AttributeTypeAndValue>> for RelativeDistinguishedName
impl<'a> AsMut<SetOfVec<AttributeTypeAndValue>> for RelativeDistinguishedName
Source§fn as_mut(&mut self) -> &mut SetOfVec<AttributeTypeAndValue>
fn as_mut(&mut self) -> &mut SetOfVec<AttributeTypeAndValue>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<'a> AsRef<SetOfVec<AttributeTypeAndValue>> for RelativeDistinguishedName
impl<'a> AsRef<SetOfVec<AttributeTypeAndValue>> for RelativeDistinguishedName
Source§fn as_ref(&self) -> &SetOfVec<AttributeTypeAndValue>
fn as_ref(&self) -> &SetOfVec<AttributeTypeAndValue>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for RelativeDistinguishedName
impl Clone for RelativeDistinguishedName
Source§impl Debug for RelativeDistinguishedName
impl Debug for RelativeDistinguishedName
Source§impl<'a> DecodeValue<'a> for RelativeDistinguishedName
impl<'a> DecodeValue<'a> for RelativeDistinguishedName
Source§impl Default for RelativeDistinguishedName
impl Default for RelativeDistinguishedName
Source§impl Display for RelativeDistinguishedName
Serializes the structure according to the rules in RFC 4514.
impl Display for RelativeDistinguishedName
Serializes the structure according to the rules in RFC 4514.
Source§impl<'a> EncodeValue for RelativeDistinguishedName
impl<'a> EncodeValue for RelativeDistinguishedName
impl Eq for RelativeDistinguishedName
Source§impl<'a> FixedTag for RelativeDistinguishedName
impl<'a> FixedTag for RelativeDistinguishedName
Source§impl<'a> From<RelativeDistinguishedName> for SetOfVec<AttributeTypeAndValue>
impl<'a> From<RelativeDistinguishedName> for SetOfVec<AttributeTypeAndValue>
Source§fn from(value: RelativeDistinguishedName) -> Self
fn from(value: RelativeDistinguishedName) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SetOfVec<AttributeTypeAndValue>> for RelativeDistinguishedName
impl<'a> From<SetOfVec<AttributeTypeAndValue>> for RelativeDistinguishedName
Source§fn from(value: SetOfVec<AttributeTypeAndValue>) -> Self
fn from(value: SetOfVec<AttributeTypeAndValue>) -> Self
Converts to this type from the input type.
Source§impl FromStr for RelativeDistinguishedName
Parse a RelativeDistinguishedName string.
impl FromStr for RelativeDistinguishedName
Parse a RelativeDistinguishedName string.
This function follows the rules in RFC 4514.
Source§impl Hash for RelativeDistinguishedName
impl Hash for RelativeDistinguishedName
impl StructuralPartialEq for RelativeDistinguishedName
Auto Trait Implementations§
impl Freeze for RelativeDistinguishedName
impl RefUnwindSafe for RelativeDistinguishedName
impl Send for RelativeDistinguishedName
impl Sync for RelativeDistinguishedName
impl Unpin for RelativeDistinguishedName
impl UnsafeUnpin for RelativeDistinguishedName
impl UnwindSafe for RelativeDistinguishedName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
Source§type Error = <T as DecodeValue<'a>>::Error
type Error = <T as DecodeValue<'a>>::Error
Type returned in the event of a decoding error.
Source§fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
Attempt to decode this TLV message using the provided decoder. Read more
impl<T> DecodeOwned for Twhere
T: for<'a> Decode<'a>,
Source§impl<T> Encode for T
impl<T> Encode for T
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this TLV object in bytes when encoded as ASN.1 DER. Read more
Source§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 TLV object to the provided byte slice, returning a sub-slice
containing the encoded message. Read more
Source§impl<T> IsConstructed for T
impl<T> IsConstructed for T
Source§const CONSTRUCTED: bool
const CONSTRUCTED: bool
ASN.1 constructed bit