pub struct NotFoundError<T>(pub PhantomData<T>);
Expand description
Represents an error indicating that a value was not found.
This struct is generic over the type T
that was not found.
§Examples
use not_found_error::NotFoundError;
let error: NotFoundError<i32> = NotFoundError::new();
assert_eq!(error.to_string(), "i32 not found");
Tuple Fields§
§0: PhantomData<T>
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for NotFoundError<T>
impl<T: Clone> Clone for NotFoundError<T>
Source§fn clone(&self) -> NotFoundError<T>
fn clone(&self) -> NotFoundError<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 NotFoundError<T>
impl<T: Debug> Debug for NotFoundError<T>
Source§impl<T> Default for NotFoundError<T>
impl<T> Default for NotFoundError<T>
Source§impl<T> Display for NotFoundError<T>
impl<T> Display for NotFoundError<T>
Source§impl<T: Debug> Error for NotFoundError<T>
impl<T: Debug> Error for NotFoundError<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: Hash> Hash for NotFoundError<T>
impl<T: Hash> Hash for NotFoundError<T>
Source§impl<T: Ord> Ord for NotFoundError<T>
impl<T: Ord> Ord for NotFoundError<T>
Source§fn cmp(&self, other: &NotFoundError<T>) -> Ordering
fn cmp(&self, other: &NotFoundError<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for NotFoundError<T>
impl<T: PartialEq> PartialEq for NotFoundError<T>
Source§impl<T: PartialOrd> PartialOrd for NotFoundError<T>
impl<T: PartialOrd> PartialOrd for NotFoundError<T>
impl<T: Copy> Copy for NotFoundError<T>
impl<T: Eq> Eq for NotFoundError<T>
impl<T> StructuralPartialEq for NotFoundError<T>
Auto Trait Implementations§
impl<T> Freeze for NotFoundError<T>
impl<T> RefUnwindSafe for NotFoundError<T>where
T: RefUnwindSafe,
impl<T> Send for NotFoundError<T>where
T: Send,
impl<T> Sync for NotFoundError<T>where
T: Sync,
impl<T> Unpin for NotFoundError<T>where
T: Unpin,
impl<T> UnwindSafe for NotFoundError<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