Trait ckb_types::prelude::Pack[][src]

pub trait Pack<T: Entity> {
    fn pack(&self) -> T;
}
Expand description

A syntactic sugar to convert a rust type into binary data.

Required methods

fn pack(&self) -> T[src]

Packs a rust type into binary data.

Implementations on Foreign Types

impl Pack<Byte32> for [u8; 32][src]

fn pack(&self) -> Byte32[src]

impl Pack<ProposalShortId> for [u8; 10][src]

impl Pack<Bytes> for Bytes[src]

fn pack(&self) -> Bytes[src]

impl Pack<Byte32Opt> for Option<H256>[src]

fn pack(&self) -> Byte32Opt[src]

impl Pack<Uint64Vec> for [Capacity][src]

fn pack(&self) -> Uint64Vec[src]

impl Pack<BytesVec> for [Bytes][src]

fn pack(&self) -> BytesVec[src]

impl Pack<Byte32Opt> for Option<Byte32>[src]

fn pack(&self) -> Byte32Opt[src]

impl Pack<CellOutputOpt> for Option<CellOutput>[src]

impl Pack<ScriptOpt> for Option<Script>[src]

fn pack(&self) -> ScriptOpt[src]

impl Pack<Bool> for bool[src]

fn pack(&self) -> Bool[src]

impl Pack<Uint32> for u32[src]

fn pack(&self) -> Uint32[src]

impl Pack<Uint64> for u64[src]

fn pack(&self) -> Uint64[src]

impl Pack<Uint128> for u128[src]

fn pack(&self) -> Uint128[src]

impl Pack<Uint32> for usize[src]

fn pack(&self) -> Uint32[src]

impl Pack<BeUint32> for u32[src]

fn pack(&self) -> BeUint32[src]

impl Pack<BeUint64> for u64[src]

fn pack(&self) -> BeUint64[src]

impl Pack<BeUint32> for usize[src]

fn pack(&self) -> BeUint32[src]

impl Pack<Bytes> for [u8][src]

fn pack(&self) -> Bytes[src]

impl Pack<Bytes> for str[src]

fn pack(&self) -> Bytes[src]

impl Pack<Bytes> for String[src]

fn pack(&self) -> Bytes[src]

impl Pack<BoolOpt> for Option<bool>[src]

fn pack(&self) -> BoolOpt[src]

impl Pack<Uint32Vec> for [u32][src]

fn pack(&self) -> Uint32Vec[src]

impl Pack<Uint32Vec> for [usize][src]

fn pack(&self) -> Uint32Vec[src]

impl Pack<Uint64Vec> for [u64][src]

fn pack(&self) -> Uint64Vec[src]

impl Pack<BytesOpt> for Option<&str>[src]

fn pack(&self) -> BytesOpt[src]

impl Pack<BytesOpt> for Option<String>[src]

fn pack(&self) -> BytesOpt[src]

impl Pack<BytesOpt> for Option<Bytes>[src]

fn pack(&self) -> BytesOpt[src]

Implementors