#[non_exhaustive]pub struct NodeError { /* private fields */ }Expand description
A unified error used by node lifecycle methods.
Implementations§
Source§impl NodeError
impl NodeError
Sourcepub const fn new(kind: NodeErrorKind, code: u32) -> Self
pub const fn new(kind: NodeErrorKind, code: u32) -> Self
Construct a new node error with the given kind and optional code.
Source§impl NodeError
impl NodeError
Sourcepub const fn backpressured() -> Self
pub const fn backpressured() -> Self
Creates a Backpressured error.
Sourcepub const fn over_budget() -> Self
pub const fn over_budget() -> Self
Creates an OverBudget error.
Creates an ExternalUnavailable error.
Sourcepub const fn execution_failed() -> Self
pub const fn execution_failed() -> Self
Creates an ExecutionFailed error.
Sourcepub const fn with_code(self, code: u32) -> Self
pub const fn with_code(self, code: u32) -> Self
Same as the above but lets you tack on a backend/platform error code.
Sourcepub const fn kind(&self) -> &NodeErrorKind
pub const fn kind(&self) -> &NodeErrorKind
Return the error kind.
Trait Implementations§
Source§impl Error for NodeError
Available on crate feature std only.
impl Error for NodeError
Available on crate feature
std only.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 From<NodeError> for RuntimeError
impl From<NodeError> for RuntimeError
Source§impl From<NodeErrorKind> for NodeError
impl From<NodeErrorKind> for NodeError
Source§fn from(kind: NodeErrorKind) -> Self
fn from(kind: NodeErrorKind) -> Self
Converts to this type from the input type.
impl Copy for NodeError
impl Eq for NodeError
impl StructuralPartialEq for NodeError
Auto Trait Implementations§
impl Freeze for NodeError
impl RefUnwindSafe for NodeError
impl Send for NodeError
impl Sync for NodeError
impl Unpin for NodeError
impl UnsafeUnpin for NodeError
impl UnwindSafe for NodeError
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