pub struct PrintableString { /* private fields */ }
Expand description
ASN.1 PrintableString
type.
Supports a subset the ASCII character set (described below).
For UTF-8, use Utf8StringRef
instead.
For the full ASCII character set, use
Ia5StringRef
.
§Supported characters
The following ASCII characters/ranges are supported:
A..Z
a..z
0..9
- “
\
(
)
+
,
-
.
/
:
=
?
Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for PrintableString
impl AsRef<[u8]> for PrintableString
Source§impl AsRef<str> for PrintableString
impl AsRef<str> for PrintableString
Source§impl Clone for PrintableString
impl Clone for PrintableString
Source§fn clone(&self) -> PrintableString
fn clone(&self) -> PrintableString
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrintableString
impl Debug for PrintableString
Source§impl<'__der> DecodeValue<'__der> for PrintableString
impl<'__der> DecodeValue<'__der> for PrintableString
Source§impl Deref for PrintableString
impl Deref for PrintableString
Source§impl Display for PrintableString
impl Display for PrintableString
Source§impl EncodeValue for PrintableString
impl EncodeValue for PrintableString
Source§impl<'a> From<&'a PrintableString> for AnyRef<'a>
impl<'a> From<&'a PrintableString> for AnyRef<'a>
Source§fn from(printable_string: &'a PrintableString) -> AnyRef<'a>
fn from(printable_string: &'a PrintableString) -> AnyRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<PrintableStringRef<'a>> for PrintableString
impl<'a> From<PrintableStringRef<'a>> for PrintableString
Source§fn from(value: PrintableStringRef<'a>) -> PrintableString
fn from(value: PrintableStringRef<'a>) -> PrintableString
Converts to this type from the input type.
Source§impl Ord for PrintableString
impl Ord for PrintableString
Source§fn cmp(&self, other: &PrintableString) -> Ordering
fn cmp(&self, other: &PrintableString) -> Ordering
1.21.0 · 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 OwnedToRef for PrintableString
impl OwnedToRef for PrintableString
Source§type Borrowed<'a> = PrintableStringRef<'a>
type Borrowed<'a> = PrintableStringRef<'a>
The resulting type referencing back to Self
Source§fn owned_to_ref(&self) -> Self::Borrowed<'_>
fn owned_to_ref(&self) -> Self::Borrowed<'_>
Creates a new object referencing back to the self for storage
Source§impl PartialEq for PrintableString
impl PartialEq for PrintableString
Source§impl PartialOrd for PrintableString
impl PartialOrd for PrintableString
Source§impl<'__der> TryFrom<&'__der Any> for PrintableString
impl<'__der> TryFrom<&'__der Any> for PrintableString
Source§impl<'__der> TryFrom<AnyRef<'__der>> for PrintableString
impl<'__der> TryFrom<AnyRef<'__der>> for PrintableString
Source§impl TryFrom<String> for PrintableString
impl TryFrom<String> for PrintableString
impl Eq for PrintableString
impl StructuralPartialEq for PrintableString
Auto Trait Implementations§
impl Freeze for PrintableString
impl RefUnwindSafe for PrintableString
impl Send for PrintableString
impl Sync for PrintableString
impl Unpin for PrintableString
impl UnwindSafe for PrintableString
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
Source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
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 value to the provided byte slice, returning a sub-slice
containing the encoded message.