pub enum Error {
Full {
code: i64,
message: String,
data: Option<Box<dyn Serialize + Send>>,
},
Provided {
code: i64,
message: &'static str,
},
}
Expand description
Error object in a response
Variants§
Implementations§
Source§impl Error
impl Error
pub const INVALID_REQUEST: Self
pub const METHOD_NOT_FOUND: Self
pub const INVALID_PARAMS: Self
pub const INTERNAL_ERROR: Self
pub const PARSE_ERROR: Self
pub fn internal<D: Display + Send>(e: D) -> Self
pub fn invalid_params(e: Error) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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