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 moresourceimpl 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
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
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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