pub struct CtxErrorImpl { /* private fields */ }Implementations§
Source§impl CtxErrorImpl
impl CtxErrorImpl
Sourcepub const fn wrap(self) -> CtxError
pub const fn wrap(self) -> CtxError
Wrap this error back into a CtxError that offers all of the functionality.
Sourcepub fn attach<C>(self, context: C) -> Selfwhere
C: AnyDebugSendSync + 'static,
pub fn attach<C>(self, context: C) -> Selfwhere
C: AnyDebugSendSync + 'static,
Add machine context to the error.
This will not override existing attachments. If you want to replace and override any
existing attachments of the same type, use attach_override instead.
Sourcepub fn attach_override<C>(self, context: C) -> Selfwhere
C: AnyDebugSendSync + 'static,
pub fn attach_override<C>(self, context: C) -> Selfwhere
C: AnyDebugSendSync + 'static,
Set machine context in the error.
This will override existing attachments of the same type. If you want to add attachments of
the same type, use attach instead.
Sourcepub fn attachments<C>(&self) -> impl Iterator<Item = &C>where
C: AnyDebugSendSync + 'static,
pub fn attachments<C>(&self) -> impl Iterator<Item = &C>where
C: AnyDebugSendSync + 'static,
Get an iterator over the machine context attachments of the given type.
Sourcepub fn attachment<C>(&self) -> Option<&C>where
C: AnyDebugSendSync + 'static,
pub fn attachment<C>(&self) -> Option<&C>where
C: AnyDebugSendSync + 'static,
Get the machine context attachment of the given type.
Trait Implementations§
Source§impl Debug for CtxErrorImpl
impl Debug for CtxErrorImpl
Source§impl Default for CtxErrorImpl
impl Default for CtxErrorImpl
Source§fn default() -> CtxErrorImpl
fn default() -> CtxErrorImpl
Returns the “default value” for a type. Read more
Source§impl Display for CtxErrorImpl
impl Display for CtxErrorImpl
Source§impl Error for CtxErrorImpl
impl Error for CtxErrorImpl
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 From<CtxError> for CtxErrorImpl
impl From<CtxError> for CtxErrorImpl
Source§impl Termination for CtxErrorImpl
Available on crate feature std only.
impl Termination for CtxErrorImpl
Available on crate feature
std only.Auto Trait Implementations§
impl Freeze for CtxErrorImpl
impl !RefUnwindSafe for CtxErrorImpl
impl Send for CtxErrorImpl
impl Sync for CtxErrorImpl
impl Unpin for CtxErrorImpl
impl !UnwindSafe for CtxErrorImpl
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