pub struct Wrapper<R> { /* private fields */ }Expand description
JSON-RPC response wrapper (i.e. message envelope)
Implementations§
Source§impl<R> Wrapper<R>
impl<R> Wrapper<R>
Sourcepub fn into_error(self) -> Option<Error>
pub fn into_error(self) -> Option<Error>
Convert this wrapper into the underlying error, if any
Sourcepub fn into_result(self) -> Result<R, Error>
pub fn into_result(self) -> Result<R, Error>
Convert this wrapper into a result type
pub fn new_with_id( id: Id, result: Option<R>, error: Option<ResponseError>, ) -> Self
Trait Implementations§
Source§impl<'de, R> Deserialize<'de> for Wrapper<R>where
R: Deserialize<'de>,
impl<'de, R> Deserialize<'de> for Wrapper<R>where
R: Deserialize<'de>,
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<R> Freeze for Wrapper<R>where
R: Freeze,
impl<R> RefUnwindSafe for Wrapper<R>where
R: RefUnwindSafe,
impl<R> Send for Wrapper<R>where
R: Send,
impl<R> Sync for Wrapper<R>where
R: Sync,
impl<R> Unpin for Wrapper<R>where
R: Unpin,
impl<R> UnsafeUnpin for Wrapper<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for Wrapper<R>where
R: 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