pub struct HandlerRefusal {
pub code: i64,
pub message: String,
}Expand description
Why a handler declined a request.
Becomes the JSON-RPC error the server reads, so the server’s tool learns
that the client said no rather than hanging.
Fields§
§code: i64The JSON-RPC error code.
message: StringA short reason.
Implementations§
Source§impl HandlerRefusal
impl HandlerRefusal
Sourcepub fn unsupported(method: &str) -> Self
pub fn unsupported(method: &str) -> Self
-32601: the client does not do this.
Trait Implementations§
Source§impl Clone for HandlerRefusal
impl Clone for HandlerRefusal
Source§impl Debug for HandlerRefusal
impl Debug for HandlerRefusal
impl Eq for HandlerRefusal
Source§impl PartialEq for HandlerRefusal
impl PartialEq for HandlerRefusal
impl StructuralPartialEq for HandlerRefusal
Auto Trait Implementations§
impl Freeze for HandlerRefusal
impl RefUnwindSafe for HandlerRefusal
impl Send for HandlerRefusal
impl Sync for HandlerRefusal
impl Unpin for HandlerRefusal
impl UnsafeUnpin for HandlerRefusal
impl UnwindSafe for HandlerRefusal
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