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 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§
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.