Struct jsonrpsee_types::error::ErrorObject
source · pub struct ErrorObject<'a> { /* private fields */ }
Expand description
Implementations§
source§impl<'a> ErrorObject<'a>
impl<'a> ErrorObject<'a>
sourcepub fn owned<S: Serialize>(
code: i32,
message: impl Into<String>,
data: Option<S>,
) -> ErrorObject<'static>
pub fn owned<S: Serialize>( code: i32, message: impl Into<String>, data: Option<S>, ) -> ErrorObject<'static>
Create a new ErrorObjectOwned
with optional data.
sourcepub fn borrowed(
code: i32,
message: &'a str,
data: Option<&'a RawValue>,
) -> ErrorObject<'a>
pub fn borrowed( code: i32, message: &'a str, data: Option<&'a RawValue>, ) -> ErrorObject<'a>
Create a new ErrorObject
with optional data.
sourcepub fn into_owned(self) -> ErrorObject<'static>
pub fn into_owned(self) -> ErrorObject<'static>
Take ownership of the parameters within, if we haven’t already.
sourcepub fn borrow(&'a self) -> ErrorObject<'a>
pub fn borrow(&'a self) -> ErrorObject<'a>
Borrow the current ErrorObject
.
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 copy 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> Deserialize<'de> for ErrorObject<'a>
impl<'de, '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>
source§impl<'a> Error for ErrorObject<'a>
impl<'a> Error for ErrorObject<'a>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<'a> From<ErrorCode> for ErrorObject<'a>
impl<'a> From<ErrorCode> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)