ckb_types::prelude

Trait Builder

Source
pub trait Builder: Default {
    type Entity: Entity;

    const NAME: &'static str;

    // Required methods
    fn expected_length(&self) -> usize;
    fn write<W>(&self, writer: &mut W) -> Result<(), Error>
       where W: Write;
    fn build(&self) -> Self::Entity;
}

Required Associated Constants§

Source

const NAME: &'static str

Required Associated Types§

Required Methods§

Source

fn expected_length(&self) -> usize

Source

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write,

Source

fn build(&self) -> Self::Entity

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Builder for AddressBuilder

Source§

const NAME: &'static str = "AddressBuilder"

Source§

type Entity = Address

Source§

impl Builder for AddressVecBuilder

Source§

const NAME: &'static str = "AddressVecBuilder"

Source§

type Entity = AddressVec

Source§

impl Builder for AlertBuilder

Source§

const NAME: &'static str = "AlertBuilder"

Source§

type Entity = Alert

Source§

impl Builder for BeUint32Builder

Source§

const NAME: &'static str = "BeUint32Builder"

Source§

type Entity = BeUint32

Source§

impl Builder for BeUint64Builder

Source§

const NAME: &'static str = "BeUint64Builder"

Source§

type Entity = BeUint64

Source§

impl Builder for BlockBuilder

Source§

const NAME: &'static str = "BlockBuilder"

Source§

type Entity = Block

Source§

impl Builder for BlockExtBuilder

Source§

const NAME: &'static str = "BlockExtBuilder"

Source§

type Entity = BlockExt

Source§

impl Builder for BlockExtV1Builder

Source§

const NAME: &'static str = "BlockExtV1Builder"

Source§

type Entity = BlockExtV1

Source§

impl Builder for BlockFilterCheckPointsBuilder

Source§

const NAME: &'static str = "BlockFilterCheckPointsBuilder"

Source§

type Entity = BlockFilterCheckPoints

Source§

impl Builder for BlockFilterHashesBuilder

Source§

const NAME: &'static str = "BlockFilterHashesBuilder"

Source§

type Entity = BlockFilterHashes

Source§

impl Builder for BlockFilterMessageBuilder

Source§

const NAME: &'static str = "BlockFilterMessageBuilder"

Source§

type Entity = BlockFilterMessage

Source§

impl Builder for BlockFiltersBuilder

Source§

const NAME: &'static str = "BlockFiltersBuilder"

Source§

type Entity = BlockFilters

Source§

impl Builder for BlockProposalBuilder

Source§

const NAME: &'static str = "BlockProposalBuilder"

Source§

type Entity = BlockProposal

Source§

impl Builder for BlockTransactionsBuilder

Source§

const NAME: &'static str = "BlockTransactionsBuilder"

Source§

type Entity = BlockTransactions

Source§

impl Builder for BlockV1Builder

Source§

const NAME: &'static str = "BlockV1Builder"

Source§

type Entity = BlockV1

Source§

impl Builder for BoolBuilder

Source§

const NAME: &'static str = "BoolBuilder"

Source§

type Entity = Bool

Source§

impl Builder for BoolOptBuilder

Source§

const NAME: &'static str = "BoolOptBuilder"

Source§

type Entity = BoolOpt

Source§

impl Builder for Byte32Builder

Source§

const NAME: &'static str = "Byte32Builder"

Source§

type Entity = Byte32

Source§

impl Builder for Byte32OptBuilder

Source§

const NAME: &'static str = "Byte32OptBuilder"

Source§

type Entity = Byte32Opt

Source§

impl Builder for Byte32VecBuilder

Source§

const NAME: &'static str = "Byte32VecBuilder"

Source§

type Entity = Byte32Vec

Source§

impl Builder for BytesBuilder

Source§

const NAME: &'static str = "BytesBuilder"

Source§

type Entity = Bytes

Source§

impl Builder for BytesOptBuilder

Source§

const NAME: &'static str = "BytesOptBuilder"

Source§

type Entity = BytesOpt

Source§

impl Builder for BytesOptVecBuilder

Source§

const NAME: &'static str = "BytesOptVecBuilder"

Source§

type Entity = BytesOptVec

Source§

impl Builder for BytesVecBuilder

Source§

const NAME: &'static str = "BytesVecBuilder"

Source§

type Entity = BytesVec

Source§

impl Builder for CellDataEntryBuilder

Source§

const NAME: &'static str = "CellDataEntryBuilder"

Source§

type Entity = CellDataEntry

Source§

impl Builder for CellDepBuilder

Source§

const NAME: &'static str = "CellDepBuilder"

Source§

type Entity = CellDep

Source§

impl Builder for CellDepVecBuilder

Source§

const NAME: &'static str = "CellDepVecBuilder"

Source§

type Entity = CellDepVec

Source§

impl Builder for CellEntryBuilder

Source§

const NAME: &'static str = "CellEntryBuilder"

Source§

type Entity = CellEntry

Source§

impl Builder for CellInputBuilder

Source§

const NAME: &'static str = "CellInputBuilder"

Source§

type Entity = CellInput

Source§

impl Builder for CellInputVecBuilder

Source§

const NAME: &'static str = "CellInputVecBuilder"

Source§

type Entity = CellInputVec

Source§

impl Builder for CellOutputBuilder

Source§

const NAME: &'static str = "CellOutputBuilder"

Source§

type Entity = CellOutput

Source§

impl Builder for CellOutputOptBuilder

Source§

const NAME: &'static str = "CellOutputOptBuilder"

Source§

type Entity = CellOutputOpt

Source§

impl Builder for CellOutputVecBuilder

Source§

const NAME: &'static str = "CellOutputVecBuilder"

Source§

type Entity = CellOutputVec

Source§

impl Builder for CellbaseWitnessBuilder

Source§

const NAME: &'static str = "CellbaseWitnessBuilder"

Source§

type Entity = CellbaseWitness

Source§

impl Builder for CompactBlockBuilder

Source§

const NAME: &'static str = "CompactBlockBuilder"

Source§

type Entity = CompactBlock

Source§

impl Builder for CompactBlockV1Builder

Source§

const NAME: &'static str = "CompactBlockV1Builder"

Source§

type Entity = CompactBlockV1

Source§

impl Builder for DiscoveryMessageBuilder

Source§

const NAME: &'static str = "DiscoveryMessageBuilder"

Source§

type Entity = DiscoveryMessage

Source§

impl Builder for DiscoveryPayloadBuilder

Source§

const NAME: &'static str = "DiscoveryPayloadBuilder"

Source§

type Entity = DiscoveryPayload

Source§

impl Builder for EpochExtBuilder

Source§

const NAME: &'static str = "EpochExtBuilder"

Source§

type Entity = EpochExt

Source§

impl Builder for FilteredBlockBuilder

Source§

const NAME: &'static str = "FilteredBlockBuilder"

Source§

type Entity = FilteredBlock

Source§

impl Builder for FilteredBlockVecBuilder

Source§

const NAME: &'static str = "FilteredBlockVecBuilder"

Source§

type Entity = FilteredBlockVec

Source§

impl Builder for GetBlockFilterCheckPointsBuilder

Source§

const NAME: &'static str = "GetBlockFilterCheckPointsBuilder"

Source§

type Entity = GetBlockFilterCheckPoints

Source§

impl Builder for GetBlockFilterHashesBuilder

Source§

const NAME: &'static str = "GetBlockFilterHashesBuilder"

Source§

type Entity = GetBlockFilterHashes

Source§

impl Builder for GetBlockFiltersBuilder

Source§

const NAME: &'static str = "GetBlockFiltersBuilder"

Source§

type Entity = GetBlockFilters

Source§

impl Builder for GetBlockProposalBuilder

Source§

const NAME: &'static str = "GetBlockProposalBuilder"

Source§

type Entity = GetBlockProposal

Source§

impl Builder for GetBlockTransactionsBuilder

Source§

const NAME: &'static str = "GetBlockTransactionsBuilder"

Source§

type Entity = GetBlockTransactions

Source§

impl Builder for GetBlocksBuilder

Source§

const NAME: &'static str = "GetBlocksBuilder"

Source§

type Entity = GetBlocks

Source§

impl Builder for GetBlocksProofBuilder

Source§

const NAME: &'static str = "GetBlocksProofBuilder"

Source§

type Entity = GetBlocksProof

Source§

impl Builder for GetHeadersBuilder

Source§

const NAME: &'static str = "GetHeadersBuilder"

Source§

type Entity = GetHeaders

Source§

impl Builder for GetLastStateBuilder

Source§

const NAME: &'static str = "GetLastStateBuilder"

Source§

type Entity = GetLastState

Source§

impl Builder for GetLastStateProofBuilder

Source§

const NAME: &'static str = "GetLastStateProofBuilder"

Source§

type Entity = GetLastStateProof

Source§

impl Builder for GetNodes2Builder

Source§

const NAME: &'static str = "GetNodes2Builder"

Source§

type Entity = GetNodes2

Source§

impl Builder for GetNodesBuilder

Source§

const NAME: &'static str = "GetNodesBuilder"

Source§

type Entity = GetNodes

Source§

impl Builder for GetRelayTransactionsBuilder

Source§

const NAME: &'static str = "GetRelayTransactionsBuilder"

Source§

type Entity = GetRelayTransactions

Source§

impl Builder for GetTransactionsProofBuilder

Source§

const NAME: &'static str = "GetTransactionsProofBuilder"

Source§

type Entity = GetTransactionsProof

Source§

impl Builder for HeaderBuilder

Source§

const NAME: &'static str = "HeaderBuilder"

Source§

type Entity = Header

Source§

impl Builder for HeaderDigestBuilder

Source§

const NAME: &'static str = "HeaderDigestBuilder"

Source§

type Entity = HeaderDigest

Source§

impl Builder for HeaderDigestVecBuilder

Source§

const NAME: &'static str = "HeaderDigestVecBuilder"

Source§

type Entity = HeaderDigestVec

Source§

impl Builder for HeaderVecBuilder

Source§

const NAME: &'static str = "HeaderVecBuilder"

Source§

type Entity = HeaderVec

Source§

impl Builder for HeaderViewBuilder

Source§

const NAME: &'static str = "HeaderViewBuilder"

Source§

type Entity = HeaderView

Source§

impl Builder for IdentifyBuilder

Source§

const NAME: &'static str = "IdentifyBuilder"

Source§

type Entity = Identify

Source§

impl Builder for IdentifyMessageBuilder

Source§

const NAME: &'static str = "IdentifyMessageBuilder"

Source§

type Entity = IdentifyMessage

Source§

impl Builder for InIBDBuilder

Source§

const NAME: &'static str = "InIBDBuilder"

Source§

type Entity = InIBD

Source§

impl Builder for IndexTransactionBuilder

Source§

const NAME: &'static str = "IndexTransactionBuilder"

Source§

type Entity = IndexTransaction

Source§

impl Builder for IndexTransactionVecBuilder

Source§

const NAME: &'static str = "IndexTransactionVecBuilder"

Source§

type Entity = IndexTransactionVec

Source§

impl Builder for LightClientMessageBuilder

Source§

const NAME: &'static str = "LightClientMessageBuilder"

Source§

type Entity = LightClientMessage

Source§

impl Builder for MerkleProofBuilder

Source§

const NAME: &'static str = "MerkleProofBuilder"

Source§

type Entity = MerkleProof

Source§

impl Builder for Node2Builder

Source§

const NAME: &'static str = "Node2Builder"

Source§

type Entity = Node2

Source§

impl Builder for Node2VecBuilder

Source§

const NAME: &'static str = "Node2VecBuilder"

Source§

type Entity = Node2Vec

Source§

impl Builder for NodeBuilder

Source§

const NAME: &'static str = "NodeBuilder"

Source§

type Entity = Node

Source§

impl Builder for NodeVecBuilder

Source§

const NAME: &'static str = "NodeVecBuilder"

Source§

type Entity = NodeVec

Source§

impl Builder for Nodes2Builder

Source§

const NAME: &'static str = "Nodes2Builder"

Source§

type Entity = Nodes2

Source§

impl Builder for NodesBuilder

Source§

const NAME: &'static str = "NodesBuilder"

Source§

type Entity = Nodes

Source§

impl Builder for NumberHashBuilder

Source§

const NAME: &'static str = "NumberHashBuilder"

Source§

type Entity = NumberHash

Source§

impl Builder for OutPointBuilder

Source§

const NAME: &'static str = "OutPointBuilder"

Source§

type Entity = OutPoint

Source§

impl Builder for OutPointVecBuilder

Source§

const NAME: &'static str = "OutPointVecBuilder"

Source§

type Entity = OutPointVec

Source§

impl Builder for PingBuilder

Source§

const NAME: &'static str = "PingBuilder"

Source§

type Entity = Ping

Source§

impl Builder for PingMessageBuilder

Source§

const NAME: &'static str = "PingMessageBuilder"

Source§

type Entity = PingMessage

Source§

impl Builder for PingPayloadBuilder

Source§

const NAME: &'static str = "PingPayloadBuilder"

Source§

type Entity = PingPayload

Source§

impl Builder for PongBuilder

Source§

const NAME: &'static str = "PongBuilder"

Source§

type Entity = Pong

Source§

impl Builder for PortOptBuilder

Source§

const NAME: &'static str = "PortOptBuilder"

Source§

type Entity = PortOpt

Source§

impl Builder for ProposalShortIdBuilder

Source§

const NAME: &'static str = "ProposalShortIdBuilder"

Source§

type Entity = ProposalShortId

Source§

impl Builder for ProposalShortIdVecBuilder

Source§

const NAME: &'static str = "ProposalShortIdVecBuilder"

Source§

type Entity = ProposalShortIdVec

Source§

impl Builder for RawAlertBuilder

Source§

const NAME: &'static str = "RawAlertBuilder"

Source§

type Entity = RawAlert

Source§

impl Builder for RawHeaderBuilder

Source§

const NAME: &'static str = "RawHeaderBuilder"

Source§

type Entity = RawHeader

Source§

impl Builder for RawTransactionBuilder

Source§

const NAME: &'static str = "RawTransactionBuilder"

Source§

type Entity = RawTransaction

Source§

impl Builder for RelayMessageBuilder

Source§

const NAME: &'static str = "RelayMessageBuilder"

Source§

type Entity = RelayMessage

Source§

impl Builder for RelayTransactionBuilder

Source§

const NAME: &'static str = "RelayTransactionBuilder"

Source§

type Entity = RelayTransaction

Source§

impl Builder for RelayTransactionHashesBuilder

Source§

const NAME: &'static str = "RelayTransactionHashesBuilder"

Source§

type Entity = RelayTransactionHashes

Source§

impl Builder for RelayTransactionVecBuilder

Source§

const NAME: &'static str = "RelayTransactionVecBuilder"

Source§

type Entity = RelayTransactionVec

Source§

impl Builder for RelayTransactionsBuilder

Source§

const NAME: &'static str = "RelayTransactionsBuilder"

Source§

type Entity = RelayTransactions

Source§

impl Builder for ScriptBuilder

Source§

const NAME: &'static str = "ScriptBuilder"

Source§

type Entity = Script

Source§

impl Builder for ScriptOptBuilder

Source§

const NAME: &'static str = "ScriptOptBuilder"

Source§

type Entity = ScriptOpt

Source§

impl Builder for SendBlockBuilder

Source§

const NAME: &'static str = "SendBlockBuilder"

Source§

type Entity = SendBlock

Source§

impl Builder for SendBlocksProofBuilder

Source§

const NAME: &'static str = "SendBlocksProofBuilder"

Source§

type Entity = SendBlocksProof

Source§

impl Builder for SendBlocksProofV1Builder

Source§

const NAME: &'static str = "SendBlocksProofV1Builder"

Source§

type Entity = SendBlocksProofV1

Source§

impl Builder for SendHeadersBuilder

Source§

const NAME: &'static str = "SendHeadersBuilder"

Source§

type Entity = SendHeaders

Source§

impl Builder for SendLastStateBuilder

Source§

const NAME: &'static str = "SendLastStateBuilder"

Source§

type Entity = SendLastState

Source§

impl Builder for SendLastStateProofBuilder

Source§

const NAME: &'static str = "SendLastStateProofBuilder"

Source§

type Entity = SendLastStateProof

Source§

impl Builder for SendTransactionsProofBuilder

Source§

const NAME: &'static str = "SendTransactionsProofBuilder"

Source§

type Entity = SendTransactionsProof

Source§

impl Builder for SendTransactionsProofV1Builder

Source§

const NAME: &'static str = "SendTransactionsProofV1Builder"

Source§

type Entity = SendTransactionsProofV1

Source§

impl Builder for SyncMessageBuilder

Source§

const NAME: &'static str = "SyncMessageBuilder"

Source§

type Entity = SyncMessage

Source§

impl Builder for TimeBuilder

Source§

const NAME: &'static str = "TimeBuilder"

Source§

type Entity = Time

Source§

impl Builder for TransactionBuilder

Source§

const NAME: &'static str = "TransactionBuilder"

Source§

type Entity = Transaction

Source§

impl Builder for TransactionInfoBuilder

Source§

const NAME: &'static str = "TransactionInfoBuilder"

Source§

type Entity = TransactionInfo

Source§

impl Builder for TransactionKeyBuilder

Source§

const NAME: &'static str = "TransactionKeyBuilder"

Source§

type Entity = TransactionKey

Source§

impl Builder for TransactionVecBuilder

Source§

const NAME: &'static str = "TransactionVecBuilder"

Source§

type Entity = TransactionVec

Source§

impl Builder for TransactionViewBuilder

Source§

const NAME: &'static str = "TransactionViewBuilder"

Source§

type Entity = TransactionView

Source§

impl Builder for Uint16Builder

Source§

const NAME: &'static str = "Uint16Builder"

Source§

type Entity = Uint16

Source§

impl Builder for Uint32Builder

Source§

const NAME: &'static str = "Uint32Builder"

Source§

type Entity = Uint32

Source§

impl Builder for Uint32VecBuilder

Source§

const NAME: &'static str = "Uint32VecBuilder"

Source§

type Entity = Uint32Vec

Source§

impl Builder for Uint64Builder

Source§

const NAME: &'static str = "Uint64Builder"

Source§

type Entity = Uint64

Source§

impl Builder for Uint64VecBuilder

Source§

const NAME: &'static str = "Uint64VecBuilder"

Source§

type Entity = Uint64Vec

Source§

impl Builder for Uint64VecOptBuilder

Source§

const NAME: &'static str = "Uint64VecOptBuilder"

Source§

type Entity = Uint64VecOpt

Source§

impl Builder for Uint128Builder

Source§

const NAME: &'static str = "Uint128Builder"

Source§

type Entity = Uint128

Source§

impl Builder for Uint256Builder

Source§

const NAME: &'static str = "Uint256Builder"

Source§

type Entity = Uint256

Source§

impl Builder for Uint256VecBuilder

Source§

const NAME: &'static str = "Uint256VecBuilder"

Source§

type Entity = Uint256Vec

Source§

impl Builder for UncleBlockBuilder

Source§

const NAME: &'static str = "UncleBlockBuilder"

Source§

type Entity = UncleBlock

Source§

impl Builder for UncleBlockVecBuilder

Source§

const NAME: &'static str = "UncleBlockVecBuilder"

Source§

type Entity = UncleBlockVec

Source§

impl Builder for UncleBlockVecViewBuilder

Source§

const NAME: &'static str = "UncleBlockVecViewBuilder"

Source§

type Entity = UncleBlockVecView

Source§

impl Builder for VerifiableHeaderBuilder

Source§

const NAME: &'static str = "VerifiableHeaderBuilder"

Source§

type Entity = VerifiableHeader

Source§

impl Builder for VerifiableHeaderVecBuilder

Source§

const NAME: &'static str = "VerifiableHeaderVecBuilder"

Source§

type Entity = VerifiableHeaderVec

Source§

impl Builder for WitnessArgsBuilder

Source§

const NAME: &'static str = "WitnessArgsBuilder"

Source§

type Entity = WitnessArgs