pub struct ErrorObject<'a> {
pub code: ErrorCode,
pub message: Cow<'a, str>,
pub data: Option<Cow<'a, RawValue>>,
}
Expand description
Details about the JSON-RPC error response.
Fields§
§code: ErrorCode
An error code.
message: Cow<'a, str>
A “pretty” error message.
data: Option<Cow<'a, RawValue>>
Some other optional error context.
Implementations§
Source§impl<'a> ErrorObject<'a>
impl<'a> ErrorObject<'a>
Sourcepub fn into_owned(self) -> ErrorObject<'static>
pub fn into_owned(self) -> ErrorObject<'static>
Take ownership of a ErrorObject
, removing any lifetimes.
Trait Implementations§
Source§impl<'a> Clone for ErrorObject<'a>
impl<'a> Clone for ErrorObject<'a>
Source§fn clone(&self) -> ErrorObject<'a>
fn clone(&self) -> ErrorObject<'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 ErrorObject<'a>
impl<'a> Debug for ErrorObject<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for ErrorObject<'a>
impl<'de: 'a, 'a> Deserialize<'de> for ErrorObject<'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
Source§impl<'a> Display for ErrorObject<'a>
impl<'a> Display for ErrorObject<'a>
Auto Trait Implementations§
impl<'a> Freeze for ErrorObject<'a>
impl<'a> RefUnwindSafe for ErrorObject<'a>
impl<'a> Send for ErrorObject<'a>
impl<'a> Sync for ErrorObject<'a>
impl<'a> Unpin for ErrorObject<'a>
impl<'a> UnwindSafe for ErrorObject<'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