pub struct BmpString<'a> { /* private fields */ }
Expand description
ASN.1 BMPSTRING
type
Note: parsing a BmpString
allocates memory since the UTF-16 to UTF-8 conversion requires a memory allocation.
(see String::from_utf16
method).
Implementations
Trait Implementations
sourceimpl<'a> CheckDerConstraints for BmpString<'a>
impl<'a> CheckDerConstraints for BmpString<'a>
fn check_constraints(any: &Any<'_>) -> Result<()>
sourceimpl<'a> TestValidCharset for BmpString<'a>
impl<'a> TestValidCharset for BmpString<'a>
sourcefn test_valid_charset(i: &[u8]) -> Result<()>
fn test_valid_charset(i: &[u8]) -> Result<()>
Check character set for this object type.
sourceimpl ToDer for BmpString<'_>
impl ToDer for BmpString<'_>
sourcefn to_der_len(&self) -> Result<usize>
fn to_der_len(&self) -> Result<usize>
Get the length of the object, when encoded Read more
sourcefn write_der_header(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_header(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER header to this writer.
sourcefn write_der_content(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_content(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER content (all except header) to this writer.
sourcefn to_der_vec(&self) -> SerializeResult<Vec<u8>>
fn to_der_vec(&self) -> SerializeResult<Vec<u8>>
Write the DER encoded representation to a newly allocated Vec<u8>
.
sourcefn to_der_vec_raw(&self) -> SerializeResult<Vec<u8>>
fn to_der_vec_raw(&self) -> SerializeResult<Vec<u8>>
Similar to using to_vec
, but uses provided values without changes.
This can generate an invalid encoding for a DER object. Read more
sourcefn write_der(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER encoded representation (header and content) into this writer. Read more
sourcefn write_der_raw(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_raw(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Similar to using to_der
, but uses provided values without changes.
This can generate an invalid encoding for a DER object. Read more
impl DerAutoDerive for BmpString<'_>
impl<'a> StructuralPartialEq for BmpString<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for BmpString<'a>
impl<'a> Send for BmpString<'a>
impl<'a> Sync for BmpString<'a>
impl<'a> Unpin for BmpString<'a>
impl<'a> UnwindSafe for BmpString<'a>
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