Trait ckb_types::prelude::Entity

source ·
pub trait Entity: Debug + Default + Clone {
    type Builder: Builder;

    const NAME: &'static str;

    // Required methods
    fn new_unchecked(data: Bytes) -> Self;
    fn as_bytes(&self) -> Bytes;
    fn as_slice(&self) -> &[u8] ;
    fn from_slice(slice: &[u8]) -> Result<Self, VerificationError>;
    fn from_compatible_slice(slice: &[u8]) -> Result<Self, VerificationError>;
    fn new_builder() -> Self::Builder;
    fn as_builder(self) -> Self::Builder;
}

Required Associated Types§

Required Associated Constants§

source

const NAME: &'static str

Required Methods§

source

fn new_unchecked(data: Bytes) -> Self

source

fn as_bytes(&self) -> Bytes

source

fn as_slice(&self) -> &[u8]

source

fn from_slice(slice: &[u8]) -> Result<Self, VerificationError>

source

fn from_compatible_slice(slice: &[u8]) -> Result<Self, VerificationError>

source

fn new_builder() -> Self::Builder

source

fn as_builder(self) -> Self::Builder

Implementors§

source§

impl Entity for AddFilter

§

type Builder = AddFilterBuilder

source§

const NAME: &'static str = "AddFilter"

source§

impl Entity for Address

§

type Builder = AddressBuilder

source§

const NAME: &'static str = "Address"

source§

impl Entity for AddressVec

§

type Builder = AddressVecBuilder

source§

const NAME: &'static str = "AddressVec"

source§

impl Entity for Alert

§

type Builder = AlertBuilder

source§

const NAME: &'static str = "Alert"

source§

impl Entity for BeUint32

§

type Builder = BeUint32Builder

source§

const NAME: &'static str = "BeUint32"

source§

impl Entity for BeUint64

§

type Builder = BeUint64Builder

source§

const NAME: &'static str = "BeUint64"

source§

impl Entity for Block

§

type Builder = BlockBuilder

source§

const NAME: &'static str = "Block"

source§

impl Entity for BlockExt

§

type Builder = BlockExtBuilder

source§

const NAME: &'static str = "BlockExt"

source§

impl Entity for BlockExtV1

§

type Builder = BlockExtV1Builder

source§

const NAME: &'static str = "BlockExtV1"

source§

impl Entity for BlockFilterCheckPoints

§

type Builder = BlockFilterCheckPointsBuilder

source§

const NAME: &'static str = "BlockFilterCheckPoints"

source§

impl Entity for BlockFilterHashes

§

type Builder = BlockFilterHashesBuilder

source§

const NAME: &'static str = "BlockFilterHashes"

source§

impl Entity for BlockFilterMessage

§

type Builder = BlockFilterMessageBuilder

source§

const NAME: &'static str = "BlockFilterMessage"

source§

impl Entity for BlockFilters

§

type Builder = BlockFiltersBuilder

source§

const NAME: &'static str = "BlockFilters"

source§

impl Entity for BlockProposal

§

type Builder = BlockProposalBuilder

source§

const NAME: &'static str = "BlockProposal"

source§

impl Entity for BlockTransactions

§

type Builder = BlockTransactionsBuilder

source§

const NAME: &'static str = "BlockTransactions"

source§

impl Entity for BlockV1

§

type Builder = BlockV1Builder

source§

const NAME: &'static str = "BlockV1"

source§

impl Entity for Bool

§

type Builder = BoolBuilder

source§

const NAME: &'static str = "Bool"

source§

impl Entity for BoolOpt

§

type Builder = BoolOptBuilder

source§

const NAME: &'static str = "BoolOpt"

source§

impl Entity for Byte32

§

type Builder = Byte32Builder

source§

const NAME: &'static str = "Byte32"

source§

impl Entity for Byte32Opt

§

type Builder = Byte32OptBuilder

source§

const NAME: &'static str = "Byte32Opt"

source§

impl Entity for Byte32Vec

§

type Builder = Byte32VecBuilder

source§

const NAME: &'static str = "Byte32Vec"

source§

impl Entity for Bytes

§

type Builder = BytesBuilder

source§

const NAME: &'static str = "Bytes"

source§

impl Entity for BytesOpt

§

type Builder = BytesOptBuilder

source§

const NAME: &'static str = "BytesOpt"

source§

impl Entity for BytesVec

§

type Builder = BytesVecBuilder

source§

const NAME: &'static str = "BytesVec"

source§

impl Entity for CellDataEntry

§

type Builder = CellDataEntryBuilder

source§

const NAME: &'static str = "CellDataEntry"

source§

impl Entity for CellDep

§

type Builder = CellDepBuilder

source§

const NAME: &'static str = "CellDep"

source§

impl Entity for CellDepVec

§

type Builder = CellDepVecBuilder

source§

const NAME: &'static str = "CellDepVec"

source§

impl Entity for CellEntry

§

type Builder = CellEntryBuilder

source§

const NAME: &'static str = "CellEntry"

source§

impl Entity for CellInput

§

type Builder = CellInputBuilder

source§

const NAME: &'static str = "CellInput"

source§

impl Entity for CellInputVec

§

type Builder = CellInputVecBuilder

source§

const NAME: &'static str = "CellInputVec"

source§

impl Entity for CellOutput

§

type Builder = CellOutputBuilder

source§

const NAME: &'static str = "CellOutput"

source§

impl Entity for CellOutputOpt

§

type Builder = CellOutputOptBuilder

source§

const NAME: &'static str = "CellOutputOpt"

source§

impl Entity for CellOutputVec

§

type Builder = CellOutputVecBuilder

source§

const NAME: &'static str = "CellOutputVec"

source§

impl Entity for CellbaseWitness

§

type Builder = CellbaseWitnessBuilder

source§

const NAME: &'static str = "CellbaseWitness"

source§

impl Entity for ClearFilter

§

type Builder = ClearFilterBuilder

source§

const NAME: &'static str = "ClearFilter"

source§

impl Entity for CompactBlock

§

type Builder = CompactBlockBuilder

source§

const NAME: &'static str = "CompactBlock"

source§

impl Entity for CompactBlockV1

§

type Builder = CompactBlockV1Builder

source§

const NAME: &'static str = "CompactBlockV1"

source§

impl Entity for DiscoveryMessage

§

type Builder = DiscoveryMessageBuilder

source§

const NAME: &'static str = "DiscoveryMessage"

source§

impl Entity for DiscoveryPayload

§

type Builder = DiscoveryPayloadBuilder

source§

const NAME: &'static str = "DiscoveryPayload"

source§

impl Entity for EpochExt

§

type Builder = EpochExtBuilder

source§

const NAME: &'static str = "EpochExt"

source§

impl Entity for FilteredBlock

§

type Builder = FilteredBlockBuilder

source§

const NAME: &'static str = "FilteredBlock"

source§

impl Entity for FilteredBlockVec

§

type Builder = FilteredBlockVecBuilder

source§

const NAME: &'static str = "FilteredBlockVec"

source§

impl Entity for GetBlockFilterCheckPoints

§

type Builder = GetBlockFilterCheckPointsBuilder

source§

const NAME: &'static str = "GetBlockFilterCheckPoints"

source§

impl Entity for GetBlockFilterHashes

§

type Builder = GetBlockFilterHashesBuilder

source§

const NAME: &'static str = "GetBlockFilterHashes"

source§

impl Entity for GetBlockFilters

§

type Builder = GetBlockFiltersBuilder

source§

const NAME: &'static str = "GetBlockFilters"

source§

impl Entity for GetBlockProposal

§

type Builder = GetBlockProposalBuilder

source§

const NAME: &'static str = "GetBlockProposal"

source§

impl Entity for GetBlockTransactions

§

type Builder = GetBlockTransactionsBuilder

source§

const NAME: &'static str = "GetBlockTransactions"

source§

impl Entity for GetBlocks

§

type Builder = GetBlocksBuilder

source§

const NAME: &'static str = "GetBlocks"

source§

impl Entity for GetBlocksProof

§

type Builder = GetBlocksProofBuilder

source§

const NAME: &'static str = "GetBlocksProof"

source§

impl Entity for GetHeaders

§

type Builder = GetHeadersBuilder

source§

const NAME: &'static str = "GetHeaders"

source§

impl Entity for GetLastState

§

type Builder = GetLastStateBuilder

source§

const NAME: &'static str = "GetLastState"

source§

impl Entity for GetLastStateProof

§

type Builder = GetLastStateProofBuilder

source§

const NAME: &'static str = "GetLastStateProof"

source§

impl Entity for GetNodes2

§

type Builder = GetNodes2Builder

source§

const NAME: &'static str = "GetNodes2"

source§

impl Entity for GetNodes

§

type Builder = GetNodesBuilder

source§

const NAME: &'static str = "GetNodes"

source§

impl Entity for GetRelayTransactions

§

type Builder = GetRelayTransactionsBuilder

source§

const NAME: &'static str = "GetRelayTransactions"

source§

impl Entity for GetTransactionsProof

§

type Builder = GetTransactionsProofBuilder

source§

const NAME: &'static str = "GetTransactionsProof"

source§

impl Entity for Header

§

type Builder = HeaderBuilder

source§

const NAME: &'static str = "Header"

source§

impl Entity for HeaderDigest

§

type Builder = HeaderDigestBuilder

source§

const NAME: &'static str = "HeaderDigest"

source§

impl Entity for HeaderDigestVec

§

type Builder = HeaderDigestVecBuilder

source§

const NAME: &'static str = "HeaderDigestVec"

source§

impl Entity for HeaderVec

§

type Builder = HeaderVecBuilder

source§

const NAME: &'static str = "HeaderVec"

source§

impl Entity for HeaderView

§

type Builder = HeaderViewBuilder

source§

const NAME: &'static str = "HeaderView"

source§

impl Entity for Identify

§

type Builder = IdentifyBuilder

source§

const NAME: &'static str = "Identify"

source§

impl Entity for IdentifyMessage

§

type Builder = IdentifyMessageBuilder

source§

const NAME: &'static str = "IdentifyMessage"

source§

impl Entity for InIBD

§

type Builder = InIBDBuilder

source§

const NAME: &'static str = "InIBD"

source§

impl Entity for IndexTransaction

§

type Builder = IndexTransactionBuilder

source§

const NAME: &'static str = "IndexTransaction"

source§

impl Entity for IndexTransactionVec

§

type Builder = IndexTransactionVecBuilder

source§

const NAME: &'static str = "IndexTransactionVec"

source§

impl Entity for LightClientMessage

§

type Builder = LightClientMessageBuilder

source§

const NAME: &'static str = "LightClientMessage"

source§

impl Entity for MerkleProof

§

type Builder = MerkleProofBuilder

source§

const NAME: &'static str = "MerkleProof"

source§

impl Entity for Node2

§

type Builder = Node2Builder

source§

const NAME: &'static str = "Node2"

source§

impl Entity for Node2Vec

§

type Builder = Node2VecBuilder

source§

const NAME: &'static str = "Node2Vec"

source§

impl Entity for Node

§

type Builder = NodeBuilder

source§

const NAME: &'static str = "Node"

source§

impl Entity for NodeVec

§

type Builder = NodeVecBuilder

source§

const NAME: &'static str = "NodeVec"

source§

impl Entity for Nodes2

§

type Builder = Nodes2Builder

source§

const NAME: &'static str = "Nodes2"

source§

impl Entity for Nodes

§

type Builder = NodesBuilder

source§

const NAME: &'static str = "Nodes"

source§

impl Entity for NumberHash

§

type Builder = NumberHashBuilder

source§

const NAME: &'static str = "NumberHash"

source§

impl Entity for OutPoint

§

type Builder = OutPointBuilder

source§

const NAME: &'static str = "OutPoint"

source§

impl Entity for OutPointVec

§

type Builder = OutPointVecBuilder

source§

const NAME: &'static str = "OutPointVec"

source§

impl Entity for Ping

§

type Builder = PingBuilder

source§

const NAME: &'static str = "Ping"

source§

impl Entity for PingMessage

§

type Builder = PingMessageBuilder

source§

const NAME: &'static str = "PingMessage"

source§

impl Entity for PingPayload

§

type Builder = PingPayloadBuilder

source§

const NAME: &'static str = "PingPayload"

source§

impl Entity for Pong

§

type Builder = PongBuilder

source§

const NAME: &'static str = "Pong"

source§

impl Entity for PortOpt

§

type Builder = PortOptBuilder

source§

const NAME: &'static str = "PortOpt"

source§

impl Entity for ProposalShortId

§

type Builder = ProposalShortIdBuilder

source§

const NAME: &'static str = "ProposalShortId"

source§

impl Entity for ProposalShortIdVec

§

type Builder = ProposalShortIdVecBuilder

source§

const NAME: &'static str = "ProposalShortIdVec"

source§

impl Entity for RawAlert

§

type Builder = RawAlertBuilder

source§

const NAME: &'static str = "RawAlert"

source§

impl Entity for RawHeader

§

type Builder = RawHeaderBuilder

source§

const NAME: &'static str = "RawHeader"

source§

impl Entity for RawTransaction

§

type Builder = RawTransactionBuilder

source§

const NAME: &'static str = "RawTransaction"

source§

impl Entity for RelayMessage

§

type Builder = RelayMessageBuilder

source§

const NAME: &'static str = "RelayMessage"

source§

impl Entity for RelayTransaction

§

type Builder = RelayTransactionBuilder

source§

const NAME: &'static str = "RelayTransaction"

source§

impl Entity for RelayTransactionHashes

§

type Builder = RelayTransactionHashesBuilder

source§

const NAME: &'static str = "RelayTransactionHashes"

source§

impl Entity for RelayTransactionVec

§

type Builder = RelayTransactionVecBuilder

source§

const NAME: &'static str = "RelayTransactionVec"

source§

impl Entity for RelayTransactions

§

type Builder = RelayTransactionsBuilder

source§

const NAME: &'static str = "RelayTransactions"

source§

impl Entity for Script

§

type Builder = ScriptBuilder

source§

const NAME: &'static str = "Script"

source§

impl Entity for ScriptOpt

§

type Builder = ScriptOptBuilder

source§

const NAME: &'static str = "ScriptOpt"

source§

impl Entity for SendBlock

§

type Builder = SendBlockBuilder

source§

const NAME: &'static str = "SendBlock"

source§

impl Entity for SendBlocksProof

§

type Builder = SendBlocksProofBuilder

source§

const NAME: &'static str = "SendBlocksProof"

source§

impl Entity for SendHeaders

§

type Builder = SendHeadersBuilder

source§

const NAME: &'static str = "SendHeaders"

source§

impl Entity for SendLastState

§

type Builder = SendLastStateBuilder

source§

const NAME: &'static str = "SendLastState"

source§

impl Entity for SendLastStateProof

§

type Builder = SendLastStateProofBuilder

source§

const NAME: &'static str = "SendLastStateProof"

source§

impl Entity for SendTransactionsProof

§

type Builder = SendTransactionsProofBuilder

source§

const NAME: &'static str = "SendTransactionsProof"

source§

impl Entity for SetFilter

§

type Builder = SetFilterBuilder

source§

const NAME: &'static str = "SetFilter"

source§

impl Entity for SyncMessage

§

type Builder = SyncMessageBuilder

source§

const NAME: &'static str = "SyncMessage"

source§

impl Entity for Time

§

type Builder = TimeBuilder

source§

const NAME: &'static str = "Time"

source§

impl Entity for Transaction

§

type Builder = TransactionBuilder

source§

const NAME: &'static str = "Transaction"

source§

impl Entity for TransactionInfo

§

type Builder = TransactionInfoBuilder

source§

const NAME: &'static str = "TransactionInfo"

source§

impl Entity for TransactionKey

§

type Builder = TransactionKeyBuilder

source§

const NAME: &'static str = "TransactionKey"

source§

impl Entity for TransactionVec

§

type Builder = TransactionVecBuilder

source§

const NAME: &'static str = "TransactionVec"

source§

impl Entity for TransactionView

§

type Builder = TransactionViewBuilder

source§

const NAME: &'static str = "TransactionView"

source§

impl Entity for Uint16

§

type Builder = Uint16Builder

source§

const NAME: &'static str = "Uint16"

source§

impl Entity for Uint32

§

type Builder = Uint32Builder

source§

const NAME: &'static str = "Uint32"

source§

impl Entity for Uint32Vec

§

type Builder = Uint32VecBuilder

source§

const NAME: &'static str = "Uint32Vec"

source§

impl Entity for Uint64

§

type Builder = Uint64Builder

source§

const NAME: &'static str = "Uint64"

source§

impl Entity for Uint64Vec

§

type Builder = Uint64VecBuilder

source§

const NAME: &'static str = "Uint64Vec"

source§

impl Entity for Uint64VecOpt

§

type Builder = Uint64VecOptBuilder

source§

const NAME: &'static str = "Uint64VecOpt"

source§

impl Entity for Uint128

§

type Builder = Uint128Builder

source§

const NAME: &'static str = "Uint128"

source§

impl Entity for Uint256

§

type Builder = Uint256Builder

source§

const NAME: &'static str = "Uint256"

source§

impl Entity for Uint256Vec

§

type Builder = Uint256VecBuilder

source§

const NAME: &'static str = "Uint256Vec"

source§

impl Entity for UncleBlock

§

type Builder = UncleBlockBuilder

source§

const NAME: &'static str = "UncleBlock"

source§

impl Entity for UncleBlockVec

§

type Builder = UncleBlockVecBuilder

source§

const NAME: &'static str = "UncleBlockVec"

source§

impl Entity for UncleBlockVecView

§

type Builder = UncleBlockVecViewBuilder

source§

const NAME: &'static str = "UncleBlockVecView"

source§

impl Entity for VerifiableHeader

§

type Builder = VerifiableHeaderBuilder

source§

const NAME: &'static str = "VerifiableHeader"

source§

impl Entity for VerifiableHeaderVec

§

type Builder = VerifiableHeaderVecBuilder

source§

const NAME: &'static str = "VerifiableHeaderVec"

source§

impl Entity for WitnessArgs

§

type Builder = WitnessArgsBuilder

source§

const NAME: &'static str = "WitnessArgs"