Struct der::PrintableString [−][src]
ASN.1 PrintableString
type.
Supports a subset the ASCII character set (desribed below).
For UTF-8, use Utf8String
instead. For the full
ASCII character set, use Ia5String
.
Supported characters
The following ASCII characters/ranges are supported:
A..Z
a..z
0..9
- “
\
(
)
+
,
-
.
/
:
=
?
Implementations
impl<'a> PrintableString<'a>
[src]
pub fn new<T: ?Sized>(input: &'a T) -> Result<Self> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
Create a new ASN.1 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]
fn clone(&self) -> PrintableString<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn encoded_len(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
[src]
fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length>
[src]
fn to_vec(&self) -> Result<Vec<u8>>
[src]
impl<'a> Eq for PrintableString<'a>
[src]
impl<'a> From<&'_ PrintableString<'a>> for PrintableString<'a>
[src]
fn from(value: &PrintableString<'a>) -> PrintableString<'a>
[src]
impl<'a> From<PrintableString<'a>> for Any<'a>
[src]
fn from(printable_string: PrintableString<'a>) -> Any<'a>
[src]
impl<'a> Ord for PrintableString<'a>
[src]
fn cmp(&self, other: &PrintableString<'a>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<'a> PartialEq<PrintableString<'a>> for PrintableString<'a>
[src]
fn eq(&self, other: &PrintableString<'a>) -> bool
[src]
fn ne(&self, other: &PrintableString<'a>) -> bool
[src]
impl<'a> PartialOrd<PrintableString<'a>> for PrintableString<'a>
[src]
fn partial_cmp(&self, other: &PrintableString<'a>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
Auto Trait Implementations
impl<'a> RefUnwindSafe for PrintableString<'a>
impl<'a> Send for PrintableString<'a>
impl<'a> Sync for PrintableString<'a>
impl<'a> Unpin for PrintableString<'a>
impl<'a> UnwindSafe for PrintableString<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,