Type Alias jsonrpsee_types::error::ErrorObjectOwned
source · pub type ErrorObjectOwned = ErrorObject<'static>;
Expand description
Owned variant of ErrorObject
.
Aliased Type§
struct ErrorObjectOwned { /* private fields */ }
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()