#[non_exhaustive]pub enum HandlerResult {
Ok(Value),
Err(JsonRpcError),
}Expand description
The two outcomes a request handler can produce.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ok(Value)
Success — value is JSON-serialized into the response’s result.
Err(JsonRpcError)
Failure — error is serialized into the response’s error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HandlerResult
impl RefUnwindSafe for HandlerResult
impl Send for HandlerResult
impl Sync for HandlerResult
impl Unpin for HandlerResult
impl UnsafeUnpin for HandlerResult
impl UnwindSafe for HandlerResult
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