Struct der::asn1::Utf8StringRef
source · [−]pub struct Utf8StringRef<'a> { /* private fields */ }
Expand description
ASN.1 UTF8String
type.
Supports the full UTF-8 encoding.
Note that the Decode
and Encode
traits are impl’d for Rust’s str
primitive, which
decodes/encodes as a Utf8StringRef
.
You are free to use str
instead of this type, however it’s
still provided for explicitness in cases where it might be ambiguous with
other ASN.1 string encodings such as
PrintableStringRef
.
This is a zero-copy reference type which borrows from the input data.
Implementations
sourceimpl<'a> Utf8StringRef<'a>
impl<'a> Utf8StringRef<'a>
Trait Implementations
sourceimpl AsRef<str> for Utf8StringRef<'_>
impl AsRef<str> for Utf8StringRef<'_>
sourceimpl<'a> Clone for Utf8StringRef<'a>
impl<'a> Clone for Utf8StringRef<'a>
sourcefn clone(&self) -> Utf8StringRef<'a>
fn clone(&self) -> Utf8StringRef<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for Utf8StringRef<'a>
impl<'a> Debug for Utf8StringRef<'a>
sourceimpl<'a> DecodeValue<'a> for Utf8StringRef<'a>
impl<'a> DecodeValue<'a> for Utf8StringRef<'a>
sourceimpl<'a> Display for Utf8StringRef<'a>
impl<'a> Display for Utf8StringRef<'a>
sourceimpl EncodeValue for Utf8StringRef<'_>
impl EncodeValue for Utf8StringRef<'_>
sourceimpl<'a> From<&'_ Utf8StringRef<'a>> for Utf8StringRef<'a>
impl<'a> From<&'_ Utf8StringRef<'a>> for Utf8StringRef<'a>
sourcefn from(value: &Utf8StringRef<'a>) -> Utf8StringRef<'a>
fn from(value: &Utf8StringRef<'a>) -> Utf8StringRef<'a>
Converts to this type from the input type.
sourceimpl<'a> From<Utf8StringRef<'a>> for AnyRef<'a>
impl<'a> From<Utf8StringRef<'a>> for AnyRef<'a>
sourcefn from(printable_string: Utf8StringRef<'a>) -> AnyRef<'a>
fn from(printable_string: Utf8StringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
sourceimpl<'a> From<Utf8StringRef<'a>> for String
Available on crate feature alloc
only.
impl<'a> From<Utf8StringRef<'a>> for String
alloc
only.sourcefn from(s: Utf8StringRef<'a>) -> String
fn from(s: Utf8StringRef<'a>) -> String
Converts to this type from the input type.
sourceimpl<'a> Ord for Utf8StringRef<'a>
impl<'a> Ord for Utf8StringRef<'a>
sourceimpl<'a> PartialEq<Utf8StringRef<'a>> for Utf8StringRef<'a>
impl<'a> PartialEq<Utf8StringRef<'a>> for Utf8StringRef<'a>
sourcefn eq(&self, other: &Utf8StringRef<'a>) -> bool
fn eq(&self, other: &Utf8StringRef<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Utf8StringRef<'a>) -> bool
fn ne(&self, other: &Utf8StringRef<'a>) -> bool
This method tests for !=
.
sourceimpl<'a> PartialOrd<Utf8StringRef<'a>> for Utf8StringRef<'a>
impl<'a> PartialOrd<Utf8StringRef<'a>> for Utf8StringRef<'a>
sourcefn partial_cmp(&self, other: &Utf8StringRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &Utf8StringRef<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl<'a> TryFrom<AnyRef<'a>> for Utf8StringRef<'a>
impl<'a> TryFrom<AnyRef<'a>> for Utf8StringRef<'a>
impl<'a> Copy for Utf8StringRef<'a>
impl<'a> Eq for Utf8StringRef<'a>
impl<'a> StructuralEq for Utf8StringRef<'a>
impl<'a> StructuralPartialEq for Utf8StringRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Utf8StringRef<'a>
impl<'a> Send for Utf8StringRef<'a>
impl<'a> Sync for Utf8StringRef<'a>
impl<'a> Unpin for Utf8StringRef<'a>
impl<'a> UnwindSafe for Utf8StringRef<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more