[−][src]Struct jsonrpc_types::Failure
Represents failed JSON-RPC response.
Fields
jsonrpc: Option<Version>
A String specifying the version of the JSON-RPC protocol.
error: Error
Failed execution error.
id: Id
Correlation id.
It MUST be the same as the value of the id member in the Request Object.
Implementations
impl Failure
[src]
pub fn new_v1(error: Error, id: Id) -> Self
[src]
Creates a JSON-RPC 1.0 failure response.
pub fn new_v2(error: Error, id: Id) -> Self
[src]
Creates a JSON-RPC 2.0 failure response.
Trait Implementations
impl Clone for Failure
[src]
impl Debug for Failure
[src]
impl<'de> Deserialize<'de> for Failure
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Failure
[src]
impl From<Failure> for Response
[src]
impl PartialEq<Failure> for Failure
[src]
impl Serialize for Failure
[src]
impl StructuralPartialEq for Failure
[src]
Auto Trait Implementations
impl RefUnwindSafe for Failure
[src]
impl Send for Failure
[src]
impl Sync for Failure
[src]
impl Unpin for Failure
[src]
impl UnwindSafe for Failure
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,