Struct basic_text::FromTextError
source · [−]pub struct FromTextError { /* private fields */ }Expand description
FromTextError is to TextString as FromUtf8Error is to String.
Implementations
sourceimpl FromTextError
impl FromTextError
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns a slice of u8s 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
sourceimpl Clone for FromTextError
impl Clone for FromTextError
sourcefn clone(&self) -> FromTextError
fn clone(&self) -> FromTextError
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 Debug for FromTextError
impl Debug for FromTextError
sourceimpl Display for FromTextError
impl Display for FromTextError
sourceimpl Error for FromTextError
impl Error for FromTextError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<FromUtf8Error> for FromTextError
impl From<FromUtf8Error> for FromTextError
sourcefn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<FromTextError> for FromTextError
impl PartialEq<FromTextError> for FromTextError
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &FromTextError) -> bool
fn ne(&self, other: &FromTextError) -> bool
This method tests for !=.
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
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