Skip to main content

BmpString

Struct BmpString 

Source
pub struct BmpString { /* private fields */ }
Expand description

Semantic BMPString value. Parsing necessarily owns the result because BMPString wire octets are not UTF-8 and constructed BER values may span discontiguous input segments.

Implementations§

Source§

impl BmpString

Source

pub fn new(inner: String) -> Self

Source

pub fn inner(&self) -> &str

Trait Implementations§

Source§

impl ByteLen<BmpString> for BmpStringFmt

Available on crate feature alloc only.
Source§

fn length(&self, v: &BmpString) -> usize

Returns the exact number of bytes produced by serialization.
Source§

impl DeepView for BmpString

Available on crate feature alloc only.
Source§

impl DerOrd<BmpString> for BmpStringFmt

Available on crate feature alloc only.
Source§

fn der_start(&self, s: &BmpString) -> BmpStringDerState

Start traversing the encoding of value.
Source§

fn der_next(&self, s: &BmpString, state: &mut BmpStringDerState) -> Option<u8>

Return the next encoded octet, or None exactly at the end of the encoding.
Source§

fn der_leq(&self, left: &T, right: &T) -> bool

Compare two values by the complete DER TLV octets produced by this format.
Source§

impl<const HAS_MIN: bool, const MIN: usize, const HAS_MAX: bool, const MAX: usize> Pred<BmpString> for Size<HAS_MIN, MIN, HAS_MAX, MAX>

Available on crate feature alloc only.
Source§

fn test(&self, value: &BmpString) -> bool

Source§

impl Prepare<BmpString> for BmpStringFmt

Available on crate feature alloc only.
Source§

fn prepare(&self, v: &BmpString) -> Result<usize, PreSerializeError>

Validates v and returns its exact serialized length.
Source§

impl<Output: OutputBuf> Serializer<Output, BmpString> for BmpStringFmt

Available on crate feature alloc only.
Source§

fn serialize_into(&self, v: &BmpString, obuf: &mut Output)

Serializes the value v into the output buffer obuf by (logically) appending the serialized bytes to the end of obuf. This view has two main benefits: Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.