pub struct Error<K = String> { /* private fields */ }
Implementations§
Source§impl<K> Error<K>
impl<K> Error<K>
pub fn new(kind: impl Into<Errors<K>>, message: impl ToString) -> Self
pub fn unknown(message: impl ToString) -> Self
pub fn id(&self) -> usize
pub fn kind(&self) -> &Errors<K>
pub fn message(&self) -> &str
pub fn set_kind(&mut self, kind: Errors<K>)
pub fn set_message(&mut self, message: String)
pub fn with_kind(self, kind: Errors<K>) -> Self
pub fn with_message(self, message: String) -> Self
Trait Implementations§
Source§impl<K> Error for Error<K>
impl<K> Error for Error<K>
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<K> From<FromUtf16Error> for Error<K>
impl<K> From<FromUtf16Error> for Error<K>
Source§fn from(err: FromUtf16Error) -> Self
fn from(err: FromUtf16Error) -> Self
Converts to this type from the input type.
Source§impl<K> From<FromUtf8Error> for Error<K>
impl<K> From<FromUtf8Error> for Error<K>
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl<K> From<ParseFloatError> for Error<K>
impl<K> From<ParseFloatError> for Error<K>
Source§fn from(err: ParseFloatError) -> Self
fn from(err: ParseFloatError) -> Self
Converts to this type from the input type.
Source§impl<K> From<ParseIntError> for Error<K>
impl<K> From<ParseIntError> for Error<K>
Source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl<K: Ord> Ord for Error<K>
impl<K: Ord> Ord for Error<K>
Source§impl<K: PartialOrd> PartialOrd for Error<K>
impl<K: PartialOrd> PartialOrd for Error<K>
impl<K: Eq> Eq for Error<K>
impl<K> Send for Error<K>
impl<K> StructuralPartialEq for Error<K>
impl<K> Sync for Error<K>
Auto Trait Implementations§
impl<K> Freeze for Error<K>where
K: Freeze,
impl<K> RefUnwindSafe for Error<K>where
K: RefUnwindSafe,
impl<K> Unpin for Error<K>where
K: Unpin,
impl<K> UnwindSafe for Error<K>where
K: 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