Struct rcgen::DistinguishedName
source · pub struct DistinguishedName { /* private fields */ }
Expand description
Implementations§
source§impl DistinguishedName
impl DistinguishedName
sourcepub fn get(&self, ty: &DnType) -> Option<&DnValue>
pub fn get(&self, ty: &DnType) -> Option<&DnValue>
Obtains the attribute value for the given attribute type
sourcepub fn remove(&mut self, ty: DnType) -> bool
pub fn remove(&mut self, ty: DnType) -> bool
Removes the attribute with the specified DnType
Returns true when an actual removal happened, false when no attribute with the specified DnType was found.
sourcepub fn push(&mut self, ty: DnType, s: impl Into<DnValue>)
pub fn push(&mut self, ty: DnType, s: impl Into<DnValue>)
Inserts or updates an attribute that consists of type and name
let mut dn = DistinguishedName::new();
dn.push(DnType::OrganizationName, "Crab widgits SE");
dn.push(DnType::CommonName, DnValue::PrintableString("Master Cert".to_string()));
assert_eq!(dn.get(&DnType::OrganizationName), Some(&DnValue::Utf8String("Crab widgits SE".to_string())));
assert_eq!(dn.get(&DnType::CommonName), Some(&DnValue::PrintableString("Master Cert".to_string())));
sourcepub fn iter(&self) -> DistinguishedNameIterator<'_> ⓘ
pub fn iter(&self) -> DistinguishedNameIterator<'_> ⓘ
Iterate over the entries
Trait Implementations§
source§impl Clone for DistinguishedName
impl Clone for DistinguishedName
source§fn clone(&self) -> DistinguishedName
fn clone(&self) -> DistinguishedName
Returns a copy of the value. Read more
1.0.0 · 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 DistinguishedName
impl Debug for DistinguishedName
source§impl PartialEq for DistinguishedName
impl PartialEq for DistinguishedName
source§fn eq(&self, other: &DistinguishedName) -> bool
fn eq(&self, other: &DistinguishedName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DistinguishedName
impl StructuralEq for DistinguishedName
impl StructuralPartialEq for DistinguishedName
Auto Trait Implementations§
impl RefUnwindSafe for DistinguishedName
impl Send for DistinguishedName
impl Sync for DistinguishedName
impl Unpin for DistinguishedName
impl UnwindSafe for DistinguishedName
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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