pub struct X509Name<'cert> { /* private fields */ }Expand description
A borrowed distinguished name (X509_NAME*) tied to its owning X509.
Implementations§
Source§impl X509Name<'_>
impl X509Name<'_>
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Number of entries (RDN components) in the name.
Sourcepub fn entry(&self, idx: usize) -> Option<X509NameEntry<'_>>
pub fn entry(&self, idx: usize) -> Option<X509NameEntry<'_>>
Access an entry by index (0-based).
Sourcepub fn to_oneline(&self) -> Option<String>
pub fn to_oneline(&self) -> Option<String>
Return a one-line string representation of this distinguished name.
Produces the legacy /CN=.../O=.../C=... slash-separated format via
X509_NAME_oneline. Useful for logging and debugging, but not
recommended for structured access — use Self::entry or
Self::to_string (which honours RFC 2253 / RFC 4514 flags) instead.
Returns None if OpenSSL fails to allocate the string.
Auto Trait Implementations§
impl<'cert> Freeze for X509Name<'cert>
impl<'cert> RefUnwindSafe for X509Name<'cert>
impl<'cert> !Send for X509Name<'cert>
impl<'cert> !Sync for X509Name<'cert>
impl<'cert> Unpin for X509Name<'cert>
impl<'cert> UnwindSafe for X509Name<'cert>
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