pub struct UniversalString<'a> { /* private fields */ }
Expand description
ASN.1 UniversalString
type
Note: parsing a UniversalString
allocates memory since the UCS-4 to UTF-8 conversion requires a memory allocation.
Implementations§
Trait Implementations§
Source§impl AsRef<str> for UniversalString<'_>
impl AsRef<str> for UniversalString<'_>
Source§impl CheckDerConstraints for UniversalString<'_>
impl CheckDerConstraints for UniversalString<'_>
Source§impl<'a> Debug for UniversalString<'a>
impl<'a> Debug for UniversalString<'a>
Source§impl<'a> From<&'a str> for UniversalString<'a>
impl<'a> From<&'a str> for UniversalString<'a>
Source§impl From<String> for UniversalString<'_>
impl From<String> for UniversalString<'_>
Source§impl<'a> PartialEq for UniversalString<'a>
impl<'a> PartialEq for UniversalString<'a>
Source§impl ToDer for UniversalString<'_>
impl ToDer for UniversalString<'_>
Source§fn to_der_len(&self) -> Result<usize>
fn to_der_len(&self) -> Result<usize>
Get the length of the object (including the header), when encoded
Source§fn 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.
Source§fn 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.
Source§fn 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>
.Source§fn 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.Source§fn 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
Source§fn 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.Source§impl<'a, 'b> TryFrom<&'b Any<'a>> for UniversalString<'a>
impl<'a, 'b> TryFrom<&'b Any<'a>> for UniversalString<'a>
Source§impl<'a> TryFrom<Any<'a>> for UniversalString<'a>
impl<'a> TryFrom<Any<'a>> for UniversalString<'a>
impl DerAutoDerive for UniversalString<'_>
impl<'a> Eq for UniversalString<'a>
impl<'a> StructuralPartialEq for UniversalString<'a>
Auto Trait Implementations§
impl<'a> Freeze for UniversalString<'a>
impl<'a> RefUnwindSafe for UniversalString<'a>
impl<'a> Send for UniversalString<'a>
impl<'a> Sync for UniversalString<'a>
impl<'a> Unpin for UniversalString<'a>
impl<'a> UnwindSafe for UniversalString<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<'a, T, E> FromDer<'a, E> for Twhere
T: TryFrom<Any<'a>, Error = E> + CheckDerConstraints + DerAutoDerive,
E: From<Error> + Display + Debug,
impl<'a, T, E> FromDer<'a, E> for Twhere
T: TryFrom<Any<'a>, Error = E> + CheckDerConstraints + DerAutoDerive,
E: From<Error> + Display + Debug,
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: 24 bytes