pub struct ErrorBase<E>where
E: Error,{ /* private fields */ }
Implementations§
Source§impl<E> ErrorBase<E>where
E: Error,
impl<E> ErrorBase<E>where
E: Error,
Sourcepub fn into_inner(self) -> E
pub fn into_inner(self) -> E
consumes the wrapper to return the inner value.
Sourcepub fn replace(&mut self, new: E) -> E
pub fn replace(&mut self, new: E) -> E
uses the replace
method to replace and return the current error
with another.
Sourcepub fn set(&mut self, new: E) -> &mut ErrorBase<E>
pub fn set(&mut self, new: E) -> &mut ErrorBase<E>
update the inner value before returning a mutable reference to the wrapper;
Sourcepub fn swap(&mut self, other: &mut ErrorBase<E>)
pub fn swap(&mut self, other: &mut ErrorBase<E>)
swap out the inner values of two instances of [RawError
].
Trait Implementations§
Source§impl<'de, E> Deserialize<'de> for ErrorBase<E>
impl<'de, E> Deserialize<'de> for ErrorBase<E>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorBase<E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorBase<E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E> Error for ErrorBase<E>where
E: Error,
impl<E> Error for ErrorBase<E>where
E: Error,
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<E> Ord for ErrorBase<E>
impl<E> Ord for ErrorBase<E>
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<E> PartialOrd for ErrorBase<E>where
E: PartialOrd + Error,
impl<E> PartialOrd for ErrorBase<E>where
E: PartialOrd + Error,
Source§impl<E> Serialize for ErrorBase<E>
impl<E> Serialize for ErrorBase<E>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<E> Copy for ErrorBase<E>
impl<E> Eq for ErrorBase<E>
impl<E> StructuralPartialEq for ErrorBase<E>where
E: Error,
Auto Trait Implementations§
impl<E> Freeze for ErrorBase<E>where
E: Freeze,
impl<E> RefUnwindSafe for ErrorBase<E>where
E: RefUnwindSafe,
impl<E> Send for ErrorBase<E>where
E: Send,
impl<E> Sync for ErrorBase<E>where
E: Sync,
impl<E> Unpin for ErrorBase<E>where
E: Unpin,
impl<E> UnwindSafe for ErrorBase<E>where
E: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Displayable for T
impl<T> Displayable for T
fn __private__(&self) -> Seal
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.