Struct der::asn1::TeletexStringRef
source · pub struct TeletexStringRef<'a> { /* private fields */ }
Expand description
ASN.1 TeletexString
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 standard defines a complex character set allowed in this type. However, quoting the ASN.1 mailing list, “a sizable volume of software in the world treats TeletexString (T61String) as a simple 8-bit string with mostly Windows Latin 1 (superset of iso-8859-1) encoding”.
Implementations§
Trait Implementations§
source§impl AsRef<[u8]> for TeletexStringRef<'_>
impl AsRef<[u8]> for TeletexStringRef<'_>
source§impl AsRef<str> for TeletexStringRef<'_>
impl AsRef<str> for TeletexStringRef<'_>
source§impl<'a> Clone for TeletexStringRef<'a>
impl<'a> Clone for TeletexStringRef<'a>
source§fn clone(&self) -> TeletexStringRef<'a>
fn clone(&self) -> TeletexStringRef<'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 TeletexStringRef<'a>
impl<'a> Debug for TeletexStringRef<'a>
source§impl<'a> DecodeValue<'a> for TeletexStringRef<'a>
impl<'a> DecodeValue<'a> for TeletexStringRef<'a>
source§impl<'a> Deref for TeletexStringRef<'a>
impl<'a> Deref for TeletexStringRef<'a>
source§impl<'a> Display for TeletexStringRef<'a>
impl<'a> Display for TeletexStringRef<'a>
source§impl<'a> EncodeValue for TeletexStringRef<'a>
impl<'a> EncodeValue for TeletexStringRef<'a>
source§impl<'a> From<&TeletexStringRef<'a>> for TeletexStringRef<'a>
impl<'a> From<&TeletexStringRef<'a>> for TeletexStringRef<'a>
source§fn from(value: &TeletexStringRef<'a>) -> TeletexStringRef<'a>
fn from(value: &TeletexStringRef<'a>) -> TeletexStringRef<'a>
Converts to this type from the input type.
source§impl<'a> From<TeletexStringRef<'a>> for AnyRef<'a>
impl<'a> From<TeletexStringRef<'a>> for AnyRef<'a>
source§fn from(teletex_string: TeletexStringRef<'a>) -> AnyRef<'a>
fn from(teletex_string: TeletexStringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
source§impl<'a> Ord for TeletexStringRef<'a>
impl<'a> Ord for TeletexStringRef<'a>
source§fn cmp(&self, other: &TeletexStringRef<'a>) -> Ordering
fn cmp(&self, other: &TeletexStringRef<'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<TeletexStringRef<'a>> for TeletexStringRef<'a>
impl<'a> PartialEq<TeletexStringRef<'a>> for TeletexStringRef<'a>
source§fn eq(&self, other: &TeletexStringRef<'a>) -> bool
fn eq(&self, other: &TeletexStringRef<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd<TeletexStringRef<'a>> for TeletexStringRef<'a>
impl<'a> PartialOrd<TeletexStringRef<'a>> for TeletexStringRef<'a>
source§fn partial_cmp(&self, other: &TeletexStringRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &TeletexStringRef<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> TryFrom<AnyRef<'a>> for TeletexStringRef<'a>
impl<'a> TryFrom<AnyRef<'a>> for TeletexStringRef<'a>
impl<'a> Copy for TeletexStringRef<'a>
impl<'a> Eq for TeletexStringRef<'a>
impl<'a> StructuralEq for TeletexStringRef<'a>
impl<'a> StructuralPartialEq for TeletexStringRef<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for TeletexStringRef<'a>
impl<'a> Send for TeletexStringRef<'a>
impl<'a> Sync for TeletexStringRef<'a>
impl<'a> Unpin for TeletexStringRef<'a>
impl<'a> UnwindSafe for TeletexStringRef<'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<'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.