Trait ckb_types::prelude::Reader

source ·
pub trait Reader<'r>: Sized + Debug + Clone + Copy {
    type Entity: Entity;

    const NAME: &'static str;

    // Required methods
    fn verify(slice: &[u8], compatible: bool) -> Result<(), VerificationError>;
    fn new_unchecked(slice: &'r [u8]) -> Self;
    fn as_slice(&self) -> &'r [u8] ;
    fn to_entity(&self) -> Self::Entity;

    // Provided methods
    fn from_slice(slice: &'r [u8]) -> Result<Self, VerificationError> { ... }
    fn from_compatible_slice(slice: &'r [u8]) -> Result<Self, VerificationError> { ... }
}

Required Associated Types§

Required Associated Constants§

source

const NAME: &'static str

Required Methods§

source

fn verify(slice: &[u8], compatible: bool) -> Result<(), VerificationError>

source

fn new_unchecked(slice: &'r [u8]) -> Self

source

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

source

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

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'r> Reader<'r> for AddressReader<'r>

§

type Entity = Address

source§

const NAME: &'static str = "AddressReader"

source§

impl<'r> Reader<'r> for AddressVecReader<'r>

§

type Entity = AddressVec

source§

const NAME: &'static str = "AddressVecReader"

source§

impl<'r> Reader<'r> for AlertReader<'r>

§

type Entity = Alert

source§

const NAME: &'static str = "AlertReader"

source§

impl<'r> Reader<'r> for BeUint32Reader<'r>

§

type Entity = BeUint32

source§

const NAME: &'static str = "BeUint32Reader"

source§

impl<'r> Reader<'r> for BeUint64Reader<'r>

§

type Entity = BeUint64

source§

const NAME: &'static str = "BeUint64Reader"

source§

impl<'r> Reader<'r> for BlockExtReader<'r>

§

type Entity = BlockExt

source§

const NAME: &'static str = "BlockExtReader"

source§

impl<'r> Reader<'r> for BlockExtV1Reader<'r>

§

type Entity = BlockExtV1

source§

const NAME: &'static str = "BlockExtV1Reader"

source§

impl<'r> Reader<'r> for BlockFilterCheckPointsReader<'r>

§

type Entity = BlockFilterCheckPoints

source§

const NAME: &'static str = "BlockFilterCheckPointsReader"

source§

impl<'r> Reader<'r> for BlockFilterHashesReader<'r>

§

type Entity = BlockFilterHashes

source§

const NAME: &'static str = "BlockFilterHashesReader"

source§

impl<'r> Reader<'r> for BlockFilterMessageReader<'r>

§

type Entity = BlockFilterMessage

source§

const NAME: &'static str = "BlockFilterMessageReader"

source§

impl<'r> Reader<'r> for BlockFiltersReader<'r>

§

type Entity = BlockFilters

source§

const NAME: &'static str = "BlockFiltersReader"

source§

impl<'r> Reader<'r> for BlockProposalReader<'r>

§

type Entity = BlockProposal

source§

const NAME: &'static str = "BlockProposalReader"

source§

impl<'r> Reader<'r> for BlockReader<'r>

§

type Entity = Block

source§

const NAME: &'static str = "BlockReader"

source§

impl<'r> Reader<'r> for BlockTransactionsReader<'r>

§

type Entity = BlockTransactions

source§

const NAME: &'static str = "BlockTransactionsReader"

source§

impl<'r> Reader<'r> for BlockV1Reader<'r>

§

type Entity = BlockV1

source§

const NAME: &'static str = "BlockV1Reader"

source§

impl<'r> Reader<'r> for BoolOptReader<'r>

§

type Entity = BoolOpt

source§

const NAME: &'static str = "BoolOptReader"

source§

impl<'r> Reader<'r> for BoolReader<'r>

§

type Entity = Bool

source§

const NAME: &'static str = "BoolReader"

source§

impl<'r> Reader<'r> for Byte32OptReader<'r>

§

type Entity = Byte32Opt

source§

const NAME: &'static str = "Byte32OptReader"

source§

impl<'r> Reader<'r> for Byte32Reader<'r>

§

type Entity = Byte32

source§

const NAME: &'static str = "Byte32Reader"

source§

impl<'r> Reader<'r> for Byte32VecReader<'r>

§

type Entity = Byte32Vec

source§

const NAME: &'static str = "Byte32VecReader"

source§

impl<'r> Reader<'r> for BytesOptReader<'r>

§

type Entity = BytesOpt

source§

const NAME: &'static str = "BytesOptReader"

source§

impl<'r> Reader<'r> for BytesOptVecReader<'r>

§

type Entity = BytesOptVec

source§

const NAME: &'static str = "BytesOptVecReader"

source§

impl<'r> Reader<'r> for BytesReader<'r>

§

type Entity = Bytes

source§

const NAME: &'static str = "BytesReader"

source§

impl<'r> Reader<'r> for BytesVecReader<'r>

§

type Entity = BytesVec

source§

const NAME: &'static str = "BytesVecReader"

source§

impl<'r> Reader<'r> for CellDataEntryReader<'r>

§

type Entity = CellDataEntry

source§

const NAME: &'static str = "CellDataEntryReader"

source§

impl<'r> Reader<'r> for CellDepReader<'r>

§

type Entity = CellDep

source§

const NAME: &'static str = "CellDepReader"

source§

impl<'r> Reader<'r> for CellDepVecReader<'r>

§

type Entity = CellDepVec

source§

const NAME: &'static str = "CellDepVecReader"

source§

impl<'r> Reader<'r> for CellEntryReader<'r>

§

type Entity = CellEntry

source§

const NAME: &'static str = "CellEntryReader"

source§

impl<'r> Reader<'r> for CellInputReader<'r>

§

type Entity = CellInput

source§

const NAME: &'static str = "CellInputReader"

source§

impl<'r> Reader<'r> for CellInputVecReader<'r>

§

type Entity = CellInputVec

source§

const NAME: &'static str = "CellInputVecReader"

source§

impl<'r> Reader<'r> for CellOutputOptReader<'r>

§

type Entity = CellOutputOpt

source§

const NAME: &'static str = "CellOutputOptReader"

source§

impl<'r> Reader<'r> for CellOutputReader<'r>

§

type Entity = CellOutput

source§

const NAME: &'static str = "CellOutputReader"

source§

impl<'r> Reader<'r> for CellOutputVecReader<'r>

§

type Entity = CellOutputVec

source§

const NAME: &'static str = "CellOutputVecReader"

source§

impl<'r> Reader<'r> for CellbaseWitnessReader<'r>

§

type Entity = CellbaseWitness

source§

const NAME: &'static str = "CellbaseWitnessReader"

source§

impl<'r> Reader<'r> for CompactBlockReader<'r>

§

type Entity = CompactBlock

source§

const NAME: &'static str = "CompactBlockReader"

source§

impl<'r> Reader<'r> for CompactBlockV1Reader<'r>

§

type Entity = CompactBlockV1

source§

const NAME: &'static str = "CompactBlockV1Reader"

source§

impl<'r> Reader<'r> for DiscoveryMessageReader<'r>

§

type Entity = DiscoveryMessage

source§

const NAME: &'static str = "DiscoveryMessageReader"

source§

impl<'r> Reader<'r> for DiscoveryPayloadReader<'r>

§

type Entity = DiscoveryPayload

source§

const NAME: &'static str = "DiscoveryPayloadReader"

source§

impl<'r> Reader<'r> for EpochExtReader<'r>

§

type Entity = EpochExt

source§

const NAME: &'static str = "EpochExtReader"

source§

impl<'r> Reader<'r> for FilteredBlockReader<'r>

§

type Entity = FilteredBlock

source§

const NAME: &'static str = "FilteredBlockReader"

source§

impl<'r> Reader<'r> for FilteredBlockVecReader<'r>

§

type Entity = FilteredBlockVec

source§

const NAME: &'static str = "FilteredBlockVecReader"

source§

impl<'r> Reader<'r> for GetBlockFilterCheckPointsReader<'r>

§

type Entity = GetBlockFilterCheckPoints

source§

const NAME: &'static str = "GetBlockFilterCheckPointsReader"

source§

impl<'r> Reader<'r> for GetBlockFilterHashesReader<'r>

§

type Entity = GetBlockFilterHashes

source§

const NAME: &'static str = "GetBlockFilterHashesReader"

source§

impl<'r> Reader<'r> for GetBlockFiltersReader<'r>

§

type Entity = GetBlockFilters

source§

const NAME: &'static str = "GetBlockFiltersReader"

source§

impl<'r> Reader<'r> for GetBlockProposalReader<'r>

§

type Entity = GetBlockProposal

source§

const NAME: &'static str = "GetBlockProposalReader"

source§

impl<'r> Reader<'r> for GetBlockTransactionsReader<'r>

§

type Entity = GetBlockTransactions

source§

const NAME: &'static str = "GetBlockTransactionsReader"

source§

impl<'r> Reader<'r> for GetBlocksProofReader<'r>

§

type Entity = GetBlocksProof

source§

const NAME: &'static str = "GetBlocksProofReader"

source§

impl<'r> Reader<'r> for GetBlocksReader<'r>

§

type Entity = GetBlocks

source§

const NAME: &'static str = "GetBlocksReader"

source§

impl<'r> Reader<'r> for GetHeadersReader<'r>

§

type Entity = GetHeaders

source§

const NAME: &'static str = "GetHeadersReader"

source§

impl<'r> Reader<'r> for GetLastStateProofReader<'r>

§

type Entity = GetLastStateProof

source§

const NAME: &'static str = "GetLastStateProofReader"

source§

impl<'r> Reader<'r> for GetLastStateReader<'r>

§

type Entity = GetLastState

source§

const NAME: &'static str = "GetLastStateReader"

source§

impl<'r> Reader<'r> for GetNodes2Reader<'r>

§

type Entity = GetNodes2

source§

const NAME: &'static str = "GetNodes2Reader"

source§

impl<'r> Reader<'r> for GetNodesReader<'r>

§

type Entity = GetNodes

source§

const NAME: &'static str = "GetNodesReader"

source§

impl<'r> Reader<'r> for GetRelayTransactionsReader<'r>

§

type Entity = GetRelayTransactions

source§

const NAME: &'static str = "GetRelayTransactionsReader"

source§

impl<'r> Reader<'r> for GetTransactionsProofReader<'r>

§

type Entity = GetTransactionsProof

source§

const NAME: &'static str = "GetTransactionsProofReader"

source§

impl<'r> Reader<'r> for HeaderDigestReader<'r>

§

type Entity = HeaderDigest

source§

const NAME: &'static str = "HeaderDigestReader"

source§

impl<'r> Reader<'r> for HeaderDigestVecReader<'r>

§

type Entity = HeaderDigestVec

source§

const NAME: &'static str = "HeaderDigestVecReader"

source§

impl<'r> Reader<'r> for HeaderReader<'r>

§

type Entity = Header

source§

const NAME: &'static str = "HeaderReader"

source§

impl<'r> Reader<'r> for HeaderVecReader<'r>

§

type Entity = HeaderVec

source§

const NAME: &'static str = "HeaderVecReader"

source§

impl<'r> Reader<'r> for HeaderViewReader<'r>

§

type Entity = HeaderView

source§

const NAME: &'static str = "HeaderViewReader"

source§

impl<'r> Reader<'r> for IdentifyMessageReader<'r>

§

type Entity = IdentifyMessage

source§

const NAME: &'static str = "IdentifyMessageReader"

source§

impl<'r> Reader<'r> for IdentifyReader<'r>

§

type Entity = Identify

source§

const NAME: &'static str = "IdentifyReader"

source§

impl<'r> Reader<'r> for InIBDReader<'r>

§

type Entity = InIBD

source§

const NAME: &'static str = "InIBDReader"

source§

impl<'r> Reader<'r> for IndexTransactionReader<'r>

§

type Entity = IndexTransaction

source§

const NAME: &'static str = "IndexTransactionReader"

source§

impl<'r> Reader<'r> for IndexTransactionVecReader<'r>

§

type Entity = IndexTransactionVec

source§

const NAME: &'static str = "IndexTransactionVecReader"

source§

impl<'r> Reader<'r> for LightClientMessageReader<'r>

§

type Entity = LightClientMessage

source§

const NAME: &'static str = "LightClientMessageReader"

source§

impl<'r> Reader<'r> for MerkleProofReader<'r>

§

type Entity = MerkleProof

source§

const NAME: &'static str = "MerkleProofReader"

source§

impl<'r> Reader<'r> for Node2Reader<'r>

§

type Entity = Node2

source§

const NAME: &'static str = "Node2Reader"

source§

impl<'r> Reader<'r> for Node2VecReader<'r>

§

type Entity = Node2Vec

source§

const NAME: &'static str = "Node2VecReader"

source§

impl<'r> Reader<'r> for NodeReader<'r>

§

type Entity = Node

source§

const NAME: &'static str = "NodeReader"

source§

impl<'r> Reader<'r> for NodeVecReader<'r>

§

type Entity = NodeVec

source§

const NAME: &'static str = "NodeVecReader"

source§

impl<'r> Reader<'r> for Nodes2Reader<'r>

§

type Entity = Nodes2

source§

const NAME: &'static str = "Nodes2Reader"

source§

impl<'r> Reader<'r> for NodesReader<'r>

§

type Entity = Nodes

source§

const NAME: &'static str = "NodesReader"

source§

impl<'r> Reader<'r> for NumberHashReader<'r>

§

type Entity = NumberHash

source§

const NAME: &'static str = "NumberHashReader"

source§

impl<'r> Reader<'r> for OutPointReader<'r>

§

type Entity = OutPoint

source§

const NAME: &'static str = "OutPointReader"

source§

impl<'r> Reader<'r> for OutPointVecReader<'r>

§

type Entity = OutPointVec

source§

const NAME: &'static str = "OutPointVecReader"

source§

impl<'r> Reader<'r> for PingMessageReader<'r>

§

type Entity = PingMessage

source§

const NAME: &'static str = "PingMessageReader"

source§

impl<'r> Reader<'r> for PingPayloadReader<'r>

§

type Entity = PingPayload

source§

const NAME: &'static str = "PingPayloadReader"

source§

impl<'r> Reader<'r> for PingReader<'r>

§

type Entity = Ping

source§

const NAME: &'static str = "PingReader"

source§

impl<'r> Reader<'r> for PongReader<'r>

§

type Entity = Pong

source§

const NAME: &'static str = "PongReader"

source§

impl<'r> Reader<'r> for PortOptReader<'r>

§

type Entity = PortOpt

source§

const NAME: &'static str = "PortOptReader"

source§

impl<'r> Reader<'r> for ProposalShortIdReader<'r>

§

type Entity = ProposalShortId

source§

const NAME: &'static str = "ProposalShortIdReader"

source§

impl<'r> Reader<'r> for ProposalShortIdVecReader<'r>

§

type Entity = ProposalShortIdVec

source§

const NAME: &'static str = "ProposalShortIdVecReader"

source§

impl<'r> Reader<'r> for RawAlertReader<'r>

§

type Entity = RawAlert

source§

const NAME: &'static str = "RawAlertReader"

source§

impl<'r> Reader<'r> for RawHeaderReader<'r>

§

type Entity = RawHeader

source§

const NAME: &'static str = "RawHeaderReader"

source§

impl<'r> Reader<'r> for RawTransactionReader<'r>

§

type Entity = RawTransaction

source§

const NAME: &'static str = "RawTransactionReader"

source§

impl<'r> Reader<'r> for RelayMessageReader<'r>

§

type Entity = RelayMessage

source§

const NAME: &'static str = "RelayMessageReader"

source§

impl<'r> Reader<'r> for RelayTransactionHashesReader<'r>

§

type Entity = RelayTransactionHashes

source§

const NAME: &'static str = "RelayTransactionHashesReader"

source§

impl<'r> Reader<'r> for RelayTransactionReader<'r>

§

type Entity = RelayTransaction

source§

const NAME: &'static str = "RelayTransactionReader"

source§

impl<'r> Reader<'r> for RelayTransactionVecReader<'r>

§

type Entity = RelayTransactionVec

source§

const NAME: &'static str = "RelayTransactionVecReader"

source§

impl<'r> Reader<'r> for RelayTransactionsReader<'r>

§

type Entity = RelayTransactions

source§

const NAME: &'static str = "RelayTransactionsReader"

source§

impl<'r> Reader<'r> for ScriptOptReader<'r>

§

type Entity = ScriptOpt

source§

const NAME: &'static str = "ScriptOptReader"

source§

impl<'r> Reader<'r> for ScriptReader<'r>

§

type Entity = Script

source§

const NAME: &'static str = "ScriptReader"

source§

impl<'r> Reader<'r> for SendBlockReader<'r>

§

type Entity = SendBlock

source§

const NAME: &'static str = "SendBlockReader"

source§

impl<'r> Reader<'r> for SendBlocksProofReader<'r>

§

type Entity = SendBlocksProof

source§

const NAME: &'static str = "SendBlocksProofReader"

source§

impl<'r> Reader<'r> for SendBlocksProofV1Reader<'r>

§

type Entity = SendBlocksProofV1

source§

const NAME: &'static str = "SendBlocksProofV1Reader"

source§

impl<'r> Reader<'r> for SendHeadersReader<'r>

§

type Entity = SendHeaders

source§

const NAME: &'static str = "SendHeadersReader"

source§

impl<'r> Reader<'r> for SendLastStateProofReader<'r>

§

type Entity = SendLastStateProof

source§

const NAME: &'static str = "SendLastStateProofReader"

source§

impl<'r> Reader<'r> for SendLastStateReader<'r>

§

type Entity = SendLastState

source§

const NAME: &'static str = "SendLastStateReader"

source§

impl<'r> Reader<'r> for SendTransactionsProofReader<'r>

§

type Entity = SendTransactionsProof

source§

const NAME: &'static str = "SendTransactionsProofReader"

source§

impl<'r> Reader<'r> for SendTransactionsProofV1Reader<'r>

§

type Entity = SendTransactionsProofV1

source§

const NAME: &'static str = "SendTransactionsProofV1Reader"

source§

impl<'r> Reader<'r> for SyncMessageReader<'r>

§

type Entity = SyncMessage

source§

const NAME: &'static str = "SyncMessageReader"

source§

impl<'r> Reader<'r> for TimeReader<'r>

§

type Entity = Time

source§

const NAME: &'static str = "TimeReader"

source§

impl<'r> Reader<'r> for TransactionInfoReader<'r>

§

type Entity = TransactionInfo

source§

const NAME: &'static str = "TransactionInfoReader"

source§

impl<'r> Reader<'r> for TransactionKeyReader<'r>

§

type Entity = TransactionKey

source§

const NAME: &'static str = "TransactionKeyReader"

source§

impl<'r> Reader<'r> for TransactionReader<'r>

§

type Entity = Transaction

source§

const NAME: &'static str = "TransactionReader"

source§

impl<'r> Reader<'r> for TransactionVecReader<'r>

§

type Entity = TransactionVec

source§

const NAME: &'static str = "TransactionVecReader"

source§

impl<'r> Reader<'r> for TransactionViewReader<'r>

§

type Entity = TransactionView

source§

const NAME: &'static str = "TransactionViewReader"

source§

impl<'r> Reader<'r> for Uint16Reader<'r>

§

type Entity = Uint16

source§

const NAME: &'static str = "Uint16Reader"

source§

impl<'r> Reader<'r> for Uint32Reader<'r>

§

type Entity = Uint32

source§

const NAME: &'static str = "Uint32Reader"

source§

impl<'r> Reader<'r> for Uint32VecReader<'r>

§

type Entity = Uint32Vec

source§

const NAME: &'static str = "Uint32VecReader"

source§

impl<'r> Reader<'r> for Uint64Reader<'r>

§

type Entity = Uint64

source§

const NAME: &'static str = "Uint64Reader"

source§

impl<'r> Reader<'r> for Uint64VecOptReader<'r>

§

type Entity = Uint64VecOpt

source§

const NAME: &'static str = "Uint64VecOptReader"

source§

impl<'r> Reader<'r> for Uint64VecReader<'r>

§

type Entity = Uint64Vec

source§

const NAME: &'static str = "Uint64VecReader"

source§

impl<'r> Reader<'r> for Uint128Reader<'r>

§

type Entity = Uint128

source§

const NAME: &'static str = "Uint128Reader"

source§

impl<'r> Reader<'r> for Uint256Reader<'r>

§

type Entity = Uint256

source§

const NAME: &'static str = "Uint256Reader"

source§

impl<'r> Reader<'r> for Uint256VecReader<'r>

§

type Entity = Uint256Vec

source§

const NAME: &'static str = "Uint256VecReader"

source§

impl<'r> Reader<'r> for UncleBlockReader<'r>

§

type Entity = UncleBlock

source§

const NAME: &'static str = "UncleBlockReader"

source§

impl<'r> Reader<'r> for UncleBlockVecReader<'r>

§

type Entity = UncleBlockVec

source§

const NAME: &'static str = "UncleBlockVecReader"

source§

impl<'r> Reader<'r> for UncleBlockVecViewReader<'r>

§

type Entity = UncleBlockVecView

source§

const NAME: &'static str = "UncleBlockVecViewReader"

source§

impl<'r> Reader<'r> for VerifiableHeaderReader<'r>

§

type Entity = VerifiableHeader

source§

const NAME: &'static str = "VerifiableHeaderReader"

source§

impl<'r> Reader<'r> for VerifiableHeaderVecReader<'r>

§

type Entity = VerifiableHeaderVec

source§

const NAME: &'static str = "VerifiableHeaderVecReader"

source§

impl<'r> Reader<'r> for WitnessArgsReader<'r>

§

type Entity = WitnessArgs

source§

const NAME: &'static str = "WitnessArgsReader"