pub enum TryFromError<'shape> {
Generic(&'static str),
Unimplemented,
UnsupportedSourceShape {
src_shape: &'shape Shape<'shape>,
expected: &'shape [&'shape Shape<'shape>],
},
Unsized,
}Expand description
Error type for TryFrom conversion failures
Variants§
Generic(&'static str)
Generic conversion error
Unimplemented
The target shape doesn’t implement conversion from any source shape (no try_from in vtable)
UnsupportedSourceShape
The target shape has a conversion implementation, but it doesn’t support converting from this specific source shape
Fields
Unsized
!Sized type
Trait Implementations§
Source§impl<'shape> Clone for TryFromError<'shape>
impl<'shape> Clone for TryFromError<'shape>
Source§fn clone(&self) -> TryFromError<'shape>
fn clone(&self) -> TryFromError<'shape>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'shape> Debug for TryFromError<'shape>
impl<'shape> Debug for TryFromError<'shape>
Source§impl<'shape> Display for TryFromError<'shape>
impl<'shape> Display for TryFromError<'shape>
Source§impl<'shape> Error for TryFromError<'shape>
impl<'shape> Error for TryFromError<'shape>
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<'shape> From<UnsizedError> for TryFromError<'shape>
impl<'shape> From<UnsizedError> for TryFromError<'shape>
Source§fn from(_value: UnsizedError) -> Self
fn from(_value: UnsizedError) -> Self
Converts to this type from the input type.
Source§impl<'shape> PartialEq for TryFromError<'shape>
impl<'shape> PartialEq for TryFromError<'shape>
impl<'shape> StructuralPartialEq for TryFromError<'shape>
Auto Trait Implementations§
impl<'shape> Freeze for TryFromError<'shape>
impl<'shape> RefUnwindSafe for TryFromError<'shape>
impl<'shape> Send for TryFromError<'shape>
impl<'shape> Sync for TryFromError<'shape>
impl<'shape> Unpin for TryFromError<'shape>
impl<'shape> UnwindSafe for TryFromError<'shape>
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