Struct jsonrpc_core::types::error::Error
source · Expand description
Error object as defined in Spec
Fields
code: ErrorCode
Code
message: String
Message
data: Option<Value>
Optional data
Implementations
sourceimpl Error
impl Error
sourcepub fn parse_error() -> Self
pub fn parse_error() -> Self
Creates new ParseError
sourcepub fn invalid_request() -> Self
pub fn invalid_request() -> Self
Creates new InvalidRequest
sourcepub fn method_not_found() -> Self
pub fn method_not_found() -> Self
Creates new MethodNotFound
sourcepub fn invalid_params<M>(message: M) -> Selfwhere
M: Into<String>,
pub fn invalid_params<M>(message: M) -> Selfwhere
M: Into<String>,
Creates new InvalidParams
sourcepub fn internal_error() -> Self
pub fn internal_error() -> Self
Creates new InternalError
sourcepub fn invalid_version() -> Self
pub fn invalid_version() -> Self
Creates new InvalidRequest
with invalid version description
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more