pub struct Output<T = Value> {
pub result: Option<T>,
pub error: Option<Error>,
pub id: Option<Id>,
}
Expand description
Represents success / failure output of JSON-RPC 1.0 response.
Fields§
§result: Option<T>
Successful execution result.
error: Option<Error>
Failed execution error.
id: Option<Id>
Correlation id.
It MUST be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
Implementations§
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for Output<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Output<T>
Source§fn 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<T: Eq> Eq for Output<T>
impl<T> StructuralPartialEq for Output<T>
Auto Trait Implementations§
impl<T> Freeze for Output<T>where
T: Freeze,
impl<T> RefUnwindSafe for Output<T>where
T: RefUnwindSafe,
impl<T> Send for Output<T>where
T: Send,
impl<T> Sync for Output<T>where
T: Sync,
impl<T> Unpin for Output<T>where
T: Unpin,
impl<T> UnwindSafe for Output<T>where
T: UnwindSafe,
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