pub enum RpcHandlerError {
Application {
code: u16,
message: String,
},
Internal(String),
}Expand description
Handler-side error that doesn’t fit the application’s normal
Ok(RpcResponsePayload) channel. The fold maps these onto a
failure-status RpcResponsePayload for the caller.
Variants§
Application
Application-defined error. The fold encodes this as
RpcStatus::Application(code) with message as the body.
Fields
Internal(String)
Catch-all for handler-internal failures. The fold encodes this
as RpcStatus::Internal with message as the body.
Trait Implementations§
Source§impl Debug for RpcHandlerError
impl Debug for RpcHandlerError
Source§impl Display for RpcHandlerError
impl Display for RpcHandlerError
Source§impl Error for RpcHandlerError
impl Error for RpcHandlerError
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()
Auto Trait Implementations§
impl Freeze for RpcHandlerError
impl RefUnwindSafe for RpcHandlerError
impl Send for RpcHandlerError
impl Sync for RpcHandlerError
impl Unpin for RpcHandlerError
impl UnsafeUnpin for RpcHandlerError
impl UnwindSafe for RpcHandlerError
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