pub struct ErrorResponse<'a> {
pub jsonrpc: Cow<'a, str>,
pub id: Option<Cow<'a, str>>,
pub error: ErrorObject<'a>,
}
Expand description
A JSON-RPC “error” response.
Fields§
§jsonrpc: Cow<'a, str>
Always expected to be “2.0”.
id: Option<Cow<'a, str>>
The message ID. None if this is a server notification.
error: ErrorObject<'a>
Error details.
Implementations§
Source§impl<'a> ErrorResponse<'a>
impl<'a> ErrorResponse<'a>
Sourcepub fn into_owned(self) -> ErrorResponse<'static>
pub fn into_owned(self) -> ErrorResponse<'static>
Take ownership of a ErrorResponse
, removing any lifetimes.
Trait Implementations§
Source§impl<'a> Clone for ErrorResponse<'a>
impl<'a> Clone for ErrorResponse<'a>
Source§fn clone(&self) -> ErrorResponse<'a>
fn clone(&self) -> ErrorResponse<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ErrorResponse<'a>
impl<'a> Debug for ErrorResponse<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for ErrorResponse<'a>
impl<'de: 'a, 'a> Deserialize<'de> for ErrorResponse<'a>
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
Auto Trait Implementations§
impl<'a> Freeze for ErrorResponse<'a>
impl<'a> RefUnwindSafe for ErrorResponse<'a>
impl<'a> Send for ErrorResponse<'a>
impl<'a> Sync for ErrorResponse<'a>
impl<'a> Unpin for ErrorResponse<'a>
impl<'a> UnwindSafe for ErrorResponse<'a>
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