ckb_types::prelude

Trait Unpack

Source
pub trait Unpack<T> {
    // Required method
    fn unpack(&self) -> T;
}
Expand description

A syntactic sugar to convert binary data into rust types.

Required Methods§

Source

fn unpack(&self) -> T

Unpack binary data into rust types.

Implementors§

Source§

impl Unpack<Option<bool>> for BoolOpt

Source§

impl Unpack<Option<H256>> for Byte32Opt

Source§

impl Unpack<Option<Vec<u64>>> for Uint64VecOpt

Source§

impl Unpack<bool> for Bool

Source§

impl Unpack<u32> for BeUint32

Source§

impl Unpack<u32> for Uint32

Source§

impl Unpack<u64> for BeUint64

Source§

impl Unpack<u64> for Uint64

Source§

impl Unpack<u128> for Uint128

Source§

impl Unpack<usize> for BeUint32

Source§

impl Unpack<usize> for Uint32

Source§

impl Unpack<BlockExt> for BlockExt

Source§

impl Unpack<BlockExt> for BlockExtV1

Source§

impl Unpack<Capacity> for Uint64

Source§

impl Unpack<EpochExt> for EpochExt

Source§

impl Unpack<EpochNumberWithFraction> for Uint64

Source§

impl Unpack<HeaderView> for HeaderView

Source§

impl Unpack<TransactionInfo> for TransactionInfo

Source§

impl Unpack<TransactionView> for TransactionView

Source§

impl Unpack<UncleBlockVecView> for UncleBlockVecView

Source§

impl Unpack<H256> for Byte32

Source§

impl Unpack<U256> for Uint256

Source§

impl Unpack<Vec<u8>> for Bytes

Source§

impl Unpack<Vec<u32>> for Uint32Vec

Source§

impl Unpack<Vec<u64>> for Uint64Vec

Source§

impl Unpack<Vec<usize>> for Uint32Vec

Source§

impl Unpack<Vec<Capacity>> for Uint64Vec

Source§

impl Unpack<Vec<Bytes>> for BytesVec

Source§

impl Unpack<Bytes> for Bytes

Source§

impl Unpack<[u8; 10]> for ProposalShortId

Source§

impl Unpack<[u8; 32]> for Byte32

Source§

impl<'r> Unpack<Option<bool>> for BoolOptReader<'r>

Source§

impl<'r> Unpack<Option<H256>> for Byte32OptReader<'r>

Source§

impl<'r> Unpack<Option<Vec<u64>>> for Uint64VecOptReader<'r>

Source§

impl<'r> Unpack<bool> for BoolReader<'r>

Source§

impl<'r> Unpack<u32> for BeUint32Reader<'r>

Source§

impl<'r> Unpack<u32> for Uint32Reader<'r>

Source§

impl<'r> Unpack<u64> for BeUint64Reader<'r>

Source§

impl<'r> Unpack<u64> for Uint64Reader<'r>

Source§

impl<'r> Unpack<u128> for Uint128Reader<'r>

Source§

impl<'r> Unpack<usize> for BeUint32Reader<'r>

Source§

impl<'r> Unpack<usize> for Uint32Reader<'r>

Source§

impl<'r> Unpack<BlockExt> for BlockExtReader<'r>

Source§

impl<'r> Unpack<BlockExt> for BlockExtV1Reader<'r>

Source§

impl<'r> Unpack<Capacity> for Uint64Reader<'r>

Source§

impl<'r> Unpack<EpochExt> for EpochExtReader<'r>

Source§

impl<'r> Unpack<EpochNumberWithFraction> for Uint64Reader<'r>

Source§

impl<'r> Unpack<HeaderView> for HeaderViewReader<'r>

Source§

impl<'r> Unpack<TransactionInfo> for TransactionInfoReader<'r>

Source§

impl<'r> Unpack<TransactionView> for TransactionViewReader<'r>

Source§

impl<'r> Unpack<UncleBlockVecView> for UncleBlockVecViewReader<'r>

Source§

impl<'r> Unpack<H256> for Byte32Reader<'r>

Source§

impl<'r> Unpack<U256> for Uint256Reader<'r>

Source§

impl<'r> Unpack<Vec<u8>> for BytesReader<'r>

Source§

impl<'r> Unpack<Vec<u32>> for Uint32VecReader<'r>

Source§

impl<'r> Unpack<Vec<u64>> for Uint64VecReader<'r>

Source§

impl<'r> Unpack<Vec<usize>> for Uint32VecReader<'r>

Source§

impl<'r> Unpack<Vec<Capacity>> for Uint64VecReader<'r>

Source§

impl<'r> Unpack<Vec<Bytes>> for BytesVecReader<'r>

Source§

impl<'r> Unpack<Bytes> for BytesReader<'r>

Source§

impl<'r> Unpack<[u8; 10]> for ProposalShortIdReader<'r>

Source§

impl<'r> Unpack<[u8; 32]> for Byte32Reader<'r>