Struct rcgen::CustomExtension
source · [−]pub struct CustomExtension { /* private fields */ }
Expand description
A custom extension of a certificate, as specified in RFC 5280
Implementations
sourceimpl CustomExtension
impl CustomExtension
sourcepub fn new_acme_identifier(sha_digest: &[u8]) -> Self
pub fn new_acme_identifier(sha_digest: &[u8]) -> Self
Creates a new acmeIdentifier extension for ACME TLS-ALPN-01 as specified in RFC 8737
Panics if the passed sha_digest
parameter doesn’t hold 32 bytes (256 bits).
sourcepub fn from_oid_content(oid: &[u64], content: Vec<u8>) -> Self
pub fn from_oid_content(oid: &[u64], content: Vec<u8>) -> Self
Create a new custom extension with the specified content
sourcepub fn set_criticality(&mut self, criticality: bool)
pub fn set_criticality(&mut self, criticality: bool)
Sets the criticality flag of the extension.
sourcepub fn criticality(&self) -> bool
pub fn criticality(&self) -> bool
Obtains the criticality flag of the extension.
sourcepub fn content(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn content(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Obtains the content of the extension.
sourcepub fn oid_components(&self) -> impl Iterator<Item = u64> + '_
pub fn oid_components(&self) -> impl Iterator<Item = u64> + '_
Obtains the OID components of the extensions, as u64 pieces
Trait Implementations
sourceimpl Clone for CustomExtension
impl Clone for CustomExtension
sourcefn clone(&self) -> CustomExtension
fn clone(&self) -> CustomExtension
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CustomExtension
impl Debug for CustomExtension
sourceimpl Hash for CustomExtension
impl Hash for CustomExtension
sourceimpl PartialEq<CustomExtension> for CustomExtension
impl PartialEq<CustomExtension> for CustomExtension
sourcefn eq(&self, other: &CustomExtension) -> bool
fn eq(&self, other: &CustomExtension) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CustomExtension) -> bool
fn ne(&self, other: &CustomExtension) -> bool
This method tests for !=
.
impl Eq for CustomExtension
impl StructuralEq for CustomExtension
impl StructuralPartialEq for CustomExtension
Auto Trait Implementations
impl RefUnwindSafe for CustomExtension
impl Send for CustomExtension
impl Sync for CustomExtension
impl Unpin for CustomExtension
impl UnwindSafe for CustomExtension
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more