pub struct X509NameBuilder(/* private fields */);
Expand description
A builder used to construct an X509Name
.
Implementations§
Source§impl X509NameBuilder
impl X509NameBuilder
Sourcepub fn new() -> Result<X509NameBuilder, ErrorStack>
pub fn new() -> Result<X509NameBuilder, ErrorStack>
Creates a new builder.
Sourcepub fn append_entry(&mut self, ne: &X509NameEntryRef) -> Result<(), ErrorStack>
pub fn append_entry(&mut self, ne: &X509NameEntryRef) -> Result<(), ErrorStack>
Add a name entry
This corresponds to X509_NAME_add_entry
.
Sourcepub fn append_entry_by_text(
&mut self,
field: &str,
value: &str,
) -> Result<(), ErrorStack>
pub fn append_entry_by_text( &mut self, field: &str, value: &str, ) -> Result<(), ErrorStack>
Add a field entry by str.
This corresponds to X509_NAME_add_entry_by_txt
.
Sourcepub fn append_entry_by_text_with_type(
&mut self,
field: &str,
value: &str,
ty: Asn1Type,
) -> Result<(), ErrorStack>
pub fn append_entry_by_text_with_type( &mut self, field: &str, value: &str, ty: Asn1Type, ) -> Result<(), ErrorStack>
Add a field entry by str with a specific type.
This corresponds to X509_NAME_add_entry_by_txt
.
Sourcepub fn append_entry_by_nid(
&mut self,
field: Nid,
value: &str,
) -> Result<(), ErrorStack>
pub fn append_entry_by_nid( &mut self, field: Nid, value: &str, ) -> Result<(), ErrorStack>
Add a field entry by NID.
This corresponds to X509_NAME_add_entry_by_NID
.
Sourcepub fn append_entry_by_nid_with_type(
&mut self,
field: Nid,
value: &str,
ty: Asn1Type,
) -> Result<(), ErrorStack>
pub fn append_entry_by_nid_with_type( &mut self, field: Nid, value: &str, ty: Asn1Type, ) -> Result<(), ErrorStack>
Add a field entry by NID with a specific type.
This corresponds to X509_NAME_add_entry_by_NID
.
Auto Trait Implementations§
impl Freeze for X509NameBuilder
impl RefUnwindSafe for X509NameBuilder
impl Send for X509NameBuilder
impl Sync for X509NameBuilder
impl Unpin for X509NameBuilder
impl UnwindSafe for X509NameBuilder
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes