pub struct ConvertError<T> {
pub error: Error,
pub value: T,
}Expand description
The error type indicating why a path cannot be converted into a normalized path.
This type is essentially an Error plus the original value.
Fields§
§error: ErrorThe error indicating why the conversion failed.
value: TThe value that failed to convert.
Implementations§
Source§impl<T> ConvertError<T>
impl<T> ConvertError<T>
Source§impl<T: ?Sized> ConvertError<&T>
impl<T: ?Sized> ConvertError<&T>
Sourcepub fn cloned(&self) -> ConvertError<T>where
T: Clone,
pub fn cloned(&self) -> ConvertError<T>where
T: Clone,
Clones the value, without changing the underlying error.
Sourcepub fn to_owned(&self) -> ConvertError<T::Owned>where
T: ToOwned,
pub fn to_owned(&self) -> ConvertError<T::Owned>where
T: ToOwned,
Converts the value into an owned version, without changing the underlying error.
Trait Implementations§
Source§impl<T: Clone> Clone for ConvertError<T>
impl<T: Clone> Clone for ConvertError<T>
Source§fn clone(&self) -> ConvertError<T>
fn clone(&self) -> ConvertError<T>
Returns a duplicate 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<T: Debug> Debug for ConvertError<T>
impl<T: Debug> Debug for ConvertError<T>
Source§impl<T: Debug> Display for ConvertError<T>
impl<T: Debug> Display for ConvertError<T>
Source§impl<T: Debug> Error for ConvertError<T>
impl<T: Debug> Error for ConvertError<T>
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<T> From<ConvertError<T>> for Error
impl<T> From<ConvertError<T>> for Error
Source§fn from(value: ConvertError<T>) -> Self
fn from(value: ConvertError<T>) -> Self
Converts a ConvertError into an Error by discarding the value.
Source§impl<T> From<Infallible> for ConvertError<T>
impl<T> From<Infallible> for ConvertError<T>
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl<T: PartialEq> PartialEq for ConvertError<T>
impl<T: PartialEq> PartialEq for ConvertError<T>
impl<T: Copy> Copy for ConvertError<T>
impl<T: Eq> Eq for ConvertError<T>
impl<T> StructuralPartialEq for ConvertError<T>
Auto Trait Implementations§
impl<T> Freeze for ConvertError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConvertError<T>where
T: RefUnwindSafe,
impl<T> Send for ConvertError<T>where
T: Send,
impl<T> Sync for ConvertError<T>where
T: Sync,
impl<T> Unpin for ConvertError<T>where
T: Unpin,
impl<T> UnsafeUnpin for ConvertError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ConvertError<T>where
T: UnwindSafe,
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