pub struct IntoStringError {
pub wtf8: Wtf8Buf,
/* private fields */
}
Expand description
Errors which can occur when converting Wtf8Buf
to String
.
Fields§
§wtf8: Wtf8Buf
Implementations§
Source§impl IntoStringError
impl IntoStringError
Sourcepub fn valid_up_to(&self) -> usize
pub fn valid_up_to(&self) -> usize
Returns the index in the given string up to which valid UTF-8 was verified.
It is the maximum index such that wstr[..index].to_str()
would
return Ok(_)
.
Sourcepub fn error_len(&self) -> usize
pub fn error_len(&self) -> usize
The length provided is that of the invalid byte sequence
that starts at the index given by valid_up_to()
.
Decoding should resume after that sequence
(after inserting a U+FFFD REPLACEMENT CHARACTER
) in case
of lossy decoding.
Trait Implementations§
Source§impl Debug for IntoStringError
impl Debug for IntoStringError
Source§impl Display for IntoStringError
impl Display for IntoStringError
Source§impl Ord for IntoStringError
impl Ord for IntoStringError
Source§fn cmp(&self, other: &IntoStringError) -> Ordering
fn cmp(&self, other: &IntoStringError) -> 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 PartialEq for IntoStringError
impl PartialEq for IntoStringError
Source§impl PartialOrd for IntoStringError
impl PartialOrd for IntoStringError
impl Eq for IntoStringError
impl StructuralPartialEq for IntoStringError
Auto Trait Implementations§
impl Freeze for IntoStringError
impl RefUnwindSafe for IntoStringError
impl Send for IntoStringError
impl Sync for IntoStringError
impl Unpin for IntoStringError
impl UnwindSafe for IntoStringError
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