Struct ckb_jsonrpc_types::JsonBytes [−][src]
pub struct JsonBytes(_);
Expand description
Variable-length binary encoded as a 0x-prefixed hex string in JSON.
Example
JSON | Binary |
---|---|
“0x” | Empty binary |
“0x00” | Single byte 0 |
“0x636b62” | 3 bytes, UTF-8 encoding of ckb |
“00” | Invalid, 0x is required |
“0x0” | Invalid, each byte requires 2 digits |
Implementations
impl JsonBytes
[src]
impl JsonBytes
[src]pub fn from_bytes(bytes: Bytes) -> Self
[src]
pub fn from_bytes(bytes: Bytes) -> Self
[src]Creates the JsonBytes
from Bytes
.
pub fn into_bytes(self) -> Bytes
[src]
pub fn into_bytes(self) -> Bytes
[src]Converts into Bytes
.
Trait Implementations
impl<'de> Deserialize<'de> for JsonBytes
[src]
impl<'de> Deserialize<'de> for JsonBytes
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Eq for JsonBytes
[src]
impl StructuralEq for JsonBytes
[src]
impl StructuralPartialEq for JsonBytes
[src]
Auto Trait Implementations
impl RefUnwindSafe for JsonBytes
impl Send for JsonBytes
impl Sync for JsonBytes
impl Unpin for JsonBytes
impl UnwindSafe for JsonBytes
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,