pub struct BasicConstraints { /* private fields */ }
Expand description
An extension which indicates whether a certificate is a CA certificate.
Implementations§
Source§impl BasicConstraints
impl BasicConstraints
Sourcepub fn new() -> BasicConstraints
pub fn new() -> BasicConstraints
Construct a new BasicConstraints
extension.
Sourcepub fn critical(&mut self) -> &mut BasicConstraints
pub fn critical(&mut self) -> &mut BasicConstraints
Sets the critical
flag to true
. The extension will be critical.
Sourcepub fn ca(&mut self) -> &mut BasicConstraints
pub fn ca(&mut self) -> &mut BasicConstraints
Sets the ca
flag to true
.
Sourcepub fn pathlen(&mut self, pathlen: u32) -> &mut BasicConstraints
pub fn pathlen(&mut self, pathlen: u32) -> &mut BasicConstraints
Sets the pathlen
to an optional non-negative value. The pathlen
is the
maximum number of CAs that can appear below this one in a chain.
Sourcepub fn build(&self) -> Result<X509Extension, ErrorStack>
pub fn build(&self) -> Result<X509Extension, ErrorStack>
Return the BasicConstraints
extension as an X509Extension
.
Trait Implementations§
Source§impl Default for BasicConstraints
impl Default for BasicConstraints
Source§fn default() -> BasicConstraints
fn default() -> BasicConstraints
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BasicConstraints
impl RefUnwindSafe for BasicConstraints
impl Send for BasicConstraints
impl Sync for BasicConstraints
impl Unpin for BasicConstraints
impl UnwindSafe for BasicConstraints
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