pub struct Utf16LeSlice<'a> { /* private fields */ }Expand description
A borrowed UTF-16LE slice plus a logical code-unit length.
num_chars counts UTF-16 code units (not Unicode scalar values) and
limits how much of bytes should be considered during rendering.
Implementations§
Source§impl<'a> Utf16LeSlice<'a>
impl<'a> Utf16LeSlice<'a>
Sourcepub fn to_string(&self) -> Result<String, Utf16LeDecodeError>
pub fn to_string(&self) -> Result<String, Utf16LeDecodeError>
Decode the UTF-16LE slice into a UTF-8 string.
Trait Implementations§
Source§impl<'a> Clone for Utf16LeSlice<'a>
impl<'a> Clone for Utf16LeSlice<'a>
Source§fn clone(&self) -> Utf16LeSlice<'a>
fn clone(&self) -> Utf16LeSlice<'a>
Returns a duplicate 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 Utf16LeSlice<'a>
impl<'a> Debug for Utf16LeSlice<'a>
Source§impl<'a> Ord for Utf16LeSlice<'a>
impl<'a> Ord for Utf16LeSlice<'a>
Source§fn cmp(&self, other: &Utf16LeSlice<'a>) -> Ordering
fn cmp(&self, other: &Utf16LeSlice<'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 Utf16LeSlice<'a>
impl<'a> PartialEq for Utf16LeSlice<'a>
Source§impl<'a> PartialOrd for Utf16LeSlice<'a>
impl<'a> PartialOrd for Utf16LeSlice<'a>
impl<'a> Copy for Utf16LeSlice<'a>
impl<'a> Eq for Utf16LeSlice<'a>
impl<'a> StructuralPartialEq for Utf16LeSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for Utf16LeSlice<'a>
impl<'a> RefUnwindSafe for Utf16LeSlice<'a>
impl<'a> Send for Utf16LeSlice<'a>
impl<'a> Sync for Utf16LeSlice<'a>
impl<'a> Unpin for Utf16LeSlice<'a>
impl<'a> UnwindSafe for Utf16LeSlice<'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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more