pub struct PrintableStringRef<'a> { /* 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
.
This is a zero-copy reference type which borrows from the input data.
§Supported characters
The following ASCII characters/ranges are supported:
A..Z
a..z
0..9
- “
\
(
)
+
,
-
.
/
:
=
?
Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for PrintableStringRef<'_>
impl AsRef<[u8]> for PrintableStringRef<'_>
Source§impl AsRef<str> for PrintableStringRef<'_>
impl AsRef<str> for PrintableStringRef<'_>
Source§impl<'a> Clone for PrintableStringRef<'a>
impl<'a> Clone for PrintableStringRef<'a>
Source§fn clone(&self) -> PrintableStringRef<'a>
fn clone(&self) -> PrintableStringRef<'a>
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<'a> Debug for PrintableStringRef<'a>
impl<'a> Debug for PrintableStringRef<'a>
Source§impl<'a> DecodeValue<'a> for PrintableStringRef<'a>
impl<'a> DecodeValue<'a> for PrintableStringRef<'a>
Source§impl<'a> Deref for PrintableStringRef<'a>
impl<'a> Deref for PrintableStringRef<'a>
Source§impl<'a> Display for PrintableStringRef<'a>
impl<'a> Display for PrintableStringRef<'a>
Source§impl<'a> EncodeValue for PrintableStringRef<'a>
impl<'a> EncodeValue for PrintableStringRef<'a>
Source§impl FixedTag for PrintableStringRef<'_>
impl FixedTag for PrintableStringRef<'_>
Source§impl<'a> From<&PrintableStringRef<'a>> for PrintableStringRef<'a>
impl<'a> From<&PrintableStringRef<'a>> for PrintableStringRef<'a>
Source§fn from(value: &PrintableStringRef<'a>) -> PrintableStringRef<'a>
fn from(value: &PrintableStringRef<'a>) -> PrintableStringRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<PrintableStringRef<'a>> for AnyRef<'a>
impl<'a> From<PrintableStringRef<'a>> for AnyRef<'a>
Source§fn from(printable_string: PrintableStringRef<'a>) -> AnyRef<'a>
fn from(printable_string: PrintableStringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
Source§impl<'a> Ord for PrintableStringRef<'a>
impl<'a> Ord for PrintableStringRef<'a>
Source§fn cmp(&self, other: &PrintableStringRef<'a>) -> Ordering
fn cmp(&self, other: &PrintableStringRef<'a>) -> 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<'a> PartialEq for PrintableStringRef<'a>
impl<'a> PartialEq for PrintableStringRef<'a>
Source§impl<'a> PartialOrd for PrintableStringRef<'a>
impl<'a> PartialOrd for PrintableStringRef<'a>
Source§impl<'a> TryFrom<AnyRef<'a>> for PrintableStringRef<'a>
impl<'a> TryFrom<AnyRef<'a>> for PrintableStringRef<'a>
impl<'a> Copy for PrintableStringRef<'a>
impl<'a> Eq for PrintableStringRef<'a>
impl<'a> StructuralPartialEq for PrintableStringRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for PrintableStringRef<'a>
impl<'a> RefUnwindSafe for PrintableStringRef<'a>
impl<'a> Send for PrintableStringRef<'a>
impl<'a> Sync for PrintableStringRef<'a>
impl<'a> Unpin for PrintableStringRef<'a>
impl<'a> UnwindSafe for PrintableStringRef<'a>
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 dyn Writer) -> Result<(), Error>
fn encode(&self, writer: &mut dyn 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.