Struct der::PrintableString[][src]

pub struct PrintableString<'a> { /* fields omitted */ }

ASN.1 PrintableString type.

Supports a subset the ASCII character set. For UTF-8 support, use Utf8String.

Supported characters

The following ASCII characters/ranges are supported:

  • A..Z
  • a..z
  • 0..9
  • " " (i.e. space)
  • \
  • (
  • )
  • +
  • ,
  • -
  • .
  • /
  • :
  • =
  • ?

Implementations

impl<'a> PrintableString<'a>[src]

pub fn new<T: ?Sized>(input: &'a T) -> Result<Self> where
    T: AsRef<[u8]>, 
[src]

Create a new PrintableString.

pub fn as_str(&self) -> &'a str[src]

Borrow the string as a str.

pub fn as_bytes(&self) -> &'a [u8][src]

Borrow the string as bytes.

pub fn len(&self) -> Length[src]

Get the length of the inner byte slice.

pub fn is_empty(&self) -> bool[src]

Is the inner string empty?

Trait Implementations

impl AsRef<[u8]> for PrintableString<'_>[src]

impl AsRef<str> for PrintableString<'_>[src]

impl<'a> Clone for PrintableString<'a>[src]

impl<'a> Copy for PrintableString<'a>[src]

impl<'a> Debug for PrintableString<'a>[src]

impl<'a> Display for PrintableString<'a>[src]

impl<'a> Encodable for PrintableString<'a>[src]

impl<'a> Eq for PrintableString<'a>[src]

impl<'a> From<&'_ PrintableString<'a>> for PrintableString<'a>[src]

impl<'a> From<PrintableString<'a>> for Any<'a>[src]

impl<'a> PartialEq<PrintableString<'a>> for PrintableString<'a>[src]

impl<'a> StructuralEq for PrintableString<'a>[src]

impl<'a> StructuralPartialEq for PrintableString<'a>[src]

impl<'a> Tagged for PrintableString<'a>[src]

impl<'a> TryFrom<Any<'a>> for PrintableString<'a>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.