Struct basic_text::FromTextError
source · pub struct FromTextError { /* private fields */ }
Expand description
FromTextError
is to TextString
as FromUtf8Error
is to String
.
Implementations§
source§impl FromTextError
impl FromTextError
sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Returns a slice of u8
s bytes that were attempted to convert to a
TextString
.
sourcepub fn into_bytes(self) -> Vec<u8>
pub fn into_bytes(self) -> Vec<u8>
Returns the bytes that were attempted to convert to a TextString
.
sourcepub fn text_error(&self) -> TextError
pub fn text_error(&self) -> TextError
Fetch a TextError
to get more details about the conversion failure.
Trait Implementations§
source§impl Clone for FromTextError
impl Clone for FromTextError
source§fn clone(&self) -> FromTextError
fn clone(&self) -> FromTextError
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 Debug for FromTextError
impl Debug for FromTextError
source§impl Display for FromTextError
impl Display for FromTextError
source§impl Error for FromTextError
impl Error for FromTextError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<FromUtf8Error> for FromTextError
impl From<FromUtf8Error> for FromTextError
source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl PartialEq<FromTextError> for FromTextError
impl PartialEq<FromTextError> for FromTextError
source§fn eq(&self, other: &FromTextError) -> bool
fn eq(&self, other: &FromTextError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FromTextError
impl StructuralEq for FromTextError
impl StructuralPartialEq for FromTextError
Auto Trait Implementations§
impl RefUnwindSafe for FromTextError
impl Send for FromTextError
impl Sync for FromTextError
impl Unpin for FromTextError
impl UnwindSafe for FromTextError
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