pub struct RpcResponseFrame {
pub id: u64,
pub output: Option<Value>,
pub error: Option<RpcErrorBody>,
}Expand description
Wire shape of a single batch response frame.
Fields§
§id: u64§output: Option<Value>§error: Option<RpcErrorBody>Implementations§
Source§impl RpcResponseFrame
impl RpcResponseFrame
pub fn ok(id: u64, output: Value) -> RpcResponseFrame
pub fn err(id: u64, error: &CoolError) -> RpcResponseFrame
Trait Implementations§
Source§impl Clone for RpcResponseFrame
impl Clone for RpcResponseFrame
Source§fn clone(&self) -> RpcResponseFrame
fn clone(&self) -> RpcResponseFrame
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 Debug for RpcResponseFrame
impl Debug for RpcResponseFrame
Source§impl<'de> Deserialize<'de> for RpcResponseFrame
impl<'de> Deserialize<'de> for RpcResponseFrame
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RpcResponseFrame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RpcResponseFrame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RpcResponseFrame
impl Serialize for RpcResponseFrame
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RpcResponseFrame
impl RefUnwindSafe for RpcResponseFrame
impl Send for RpcResponseFrame
impl Sync for RpcResponseFrame
impl Unpin for RpcResponseFrame
impl UnsafeUnpin for RpcResponseFrame
impl UnwindSafe for RpcResponseFrame
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