pub struct BmpString { /* private fields */ }Expand description
ASN.1 BMPString type.
Encodes Basic Multilingual Plane (BMP) subset of Unicode (ISO 10646), a.k.a. UCS-2.
Implementations§
Source§impl BmpString
impl BmpString
Sourcepub fn into_bytes(self) -> Box<[u8]>
pub fn into_bytes(self) -> Box<[u8]>
Obtain the inner bytes.
Sourcepub fn chars(&self) -> impl Iterator<Item = char> + '_
pub fn chars(&self) -> impl Iterator<Item = char> + '_
Get an iterator over characters in the string.
Sourcepub fn codepoints(&self) -> impl Iterator<Item = u16> + '_
pub fn codepoints(&self) -> impl Iterator<Item = u16> + '_
Get an iterator over the u16 codepoints.
Trait Implementations§
Source§impl<'a> DecodeValue<'a> for BmpString
impl<'a> DecodeValue<'a> for BmpString
Source§impl EncodeValue for BmpString
impl EncodeValue for BmpString
Source§impl From<&BmpString> for BmpString
Hack for simplifying the custom derive use case,
as there is no BmpStringRef yet.
impl From<&BmpString> for BmpString
Hack for simplifying the custom derive use case,
as there is no BmpStringRef yet.
Source§impl Ord for BmpString
impl Ord for BmpString
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for BmpString
impl PartialOrd for BmpString
impl Eq for BmpString
impl StructuralPartialEq for BmpString
Auto Trait Implementations§
impl Freeze for BmpString
impl RefUnwindSafe for BmpString
impl Send for BmpString
impl Sync for BmpString
impl Unpin for BmpString
impl UnsafeUnpin for BmpString
impl UnwindSafe for BmpString
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
Source§type Error = <T as DecodeValue<'a>>::Error
type Error = <T as DecodeValue<'a>>::Error
Type returned in the event of a decoding error.
Source§fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
Attempt to decode this TLV message using the provided decoder. Read more
Source§impl<T> Encode for T
impl<T> Encode for T
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this TLV object in bytes when encoded as ASN.1 DER. Read more
Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
Encode this TLV object to the provided byte slice, returning a sub-slice
containing the encoded message. Read more
Source§impl<T> IsConstructed for T
impl<T> IsConstructed for T
Source§const CONSTRUCTED: bool = const CONSTRUCTED: bool = T::TAG.is_constructed();
const CONSTRUCTED: bool = const CONSTRUCTED: bool = T::TAG.is_constructed();
ASN.1 constructed bit