Struct ckb_jsonrpc_types::ResponseFormat
source · pub struct ResponseFormat<V> {
pub inner: Either<V, JsonBytes>,
}
Expand description
This is a wrapper for JSON serialization to select the format between Json and Hex.
Examples
ResponseFormat<BlockView>
returns the block in its Json format or molecule serialized
Hex format.
Fields§
§inner: Either<V, JsonBytes>
The inner value.
Implementations§
Trait Implementations§
source§impl<V: Clone> Clone for ResponseFormat<V>
impl<V: Clone> Clone for ResponseFormat<V>
source§fn clone(&self) -> ResponseFormat<V>
fn clone(&self) -> ResponseFormat<V>
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<V: Debug> Debug for ResponseFormat<V>
impl<V: Debug> Debug for ResponseFormat<V>
source§impl<'de, V> Deserialize<'de> for ResponseFormat<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for ResponseFormat<V>where
V: 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
source§impl<V: Hash> Hash for ResponseFormat<V>
impl<V: Hash> Hash for ResponseFormat<V>
source§impl<V: PartialEq> PartialEq for ResponseFormat<V>
impl<V: PartialEq> PartialEq for ResponseFormat<V>
source§fn eq(&self, other: &ResponseFormat<V>) -> bool
fn eq(&self, other: &ResponseFormat<V>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<V> Serialize for ResponseFormat<V>where
V: Serialize,
impl<V> Serialize for ResponseFormat<V>where
V: Serialize,
impl<V: Eq> Eq for ResponseFormat<V>
impl<V> StructuralEq for ResponseFormat<V>
impl<V> StructuralPartialEq for ResponseFormat<V>
Auto Trait Implementations§
impl<V> RefUnwindSafe for ResponseFormat<V>where
V: RefUnwindSafe,
impl<V> Send for ResponseFormat<V>where
V: Send,
impl<V> Sync for ResponseFormat<V>where
V: Sync,
impl<V> Unpin for ResponseFormat<V>where
V: Unpin,
impl<V> UnwindSafe for ResponseFormat<V>where
V: 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