pub enum ToLeanStringError {
Reserve(ReserveError),
Fmt(Error),
}
Expand description
An error that can occur when converting a value to a LeanString
.
This error can be caused by either a reserve error when allocating memory, or a formatting error when converting the value to a string.
Variants§
Reserve(ReserveError)
An error occurred while trying to allocate memory.
Fmt(Error)
A formatting error occurred during conversion.
Trait Implementations§
Source§impl Clone for ToLeanStringError
impl Clone for ToLeanStringError
Source§fn clone(&self) -> ToLeanStringError
fn clone(&self) -> ToLeanStringError
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 ToLeanStringError
impl Debug for ToLeanStringError
Source§impl Display for ToLeanStringError
impl Display for ToLeanStringError
Source§impl Error for ToLeanStringError
impl Error for ToLeanStringError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<Error> for ToLeanStringError
impl From<Error> for ToLeanStringError
Source§impl From<ReserveError> for ToLeanStringError
impl From<ReserveError> for ToLeanStringError
Source§fn from(value: ReserveError) -> Self
fn from(value: ReserveError) -> Self
Converts to this type from the input type.
Source§impl Hash for ToLeanStringError
impl Hash for ToLeanStringError
Source§impl PartialEq for ToLeanStringError
impl PartialEq for ToLeanStringError
impl Copy for ToLeanStringError
impl Eq for ToLeanStringError
impl StructuralPartialEq for ToLeanStringError
Auto Trait Implementations§
impl Freeze for ToLeanStringError
impl RefUnwindSafe for ToLeanStringError
impl Send for ToLeanStringError
impl Sync for ToLeanStringError
impl Unpin for ToLeanStringError
impl UnwindSafe for ToLeanStringError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToLeanString for Twhere
T: Display,
impl<T> ToLeanString for Twhere
T: Display,
Source§fn try_to_lean_string(&self) -> Result<LeanString, ToLeanStringError>
fn try_to_lean_string(&self) -> Result<LeanString, ToLeanStringError>
Attempts to convert the value to a
LeanString
. Read moreSource§fn to_lean_string(&self) -> LeanString
fn to_lean_string(&self) -> LeanString
Converts the value to a
LeanString
. Read more