[][src]Trait ckb_standalone_types::prelude::Entity

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

    const NAME: &'static str;

    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; }

Associated Types

Loading content...

Associated Constants

const NAME: &'static str

Loading content...

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

Loading content...

Implementors

impl Entity for Block[src]

type Builder = BlockBuilder

impl Entity for Byte32[src]

type Builder = Byte32Builder

impl Entity for Byte32Vec[src]

impl Entity for Bytes[src]

type Builder = BytesBuilder

impl Entity for BytesOpt[src]

type Builder = BytesOptBuilder

impl Entity for BytesVec[src]

type Builder = BytesVecBuilder

impl Entity for CellDep[src]

type Builder = CellDepBuilder

impl Entity for CellDepVec[src]

impl Entity for CellInput[src]

impl Entity for CellInputVec[src]

impl Entity for CellOutput[src]

impl Entity for CellOutputVec[src]

impl Entity for CellbaseWitness[src]

impl Entity for Header[src]

type Builder = HeaderBuilder

impl Entity for OutPoint[src]

type Builder = OutPointBuilder

impl Entity for ProposalShortId[src]

impl Entity for ProposalShortIdVec[src]

impl Entity for RawHeader[src]

impl Entity for RawTransaction[src]

impl Entity for Script[src]

type Builder = ScriptBuilder

impl Entity for ScriptOpt[src]

impl Entity for Transaction[src]

impl Entity for TransactionVec[src]

impl Entity for Uint128[src]

type Builder = Uint128Builder

impl Entity for Uint256[src]

type Builder = Uint256Builder

impl Entity for Uint32[src]

type Builder = Uint32Builder

impl Entity for Uint64[src]

type Builder = Uint64Builder

impl Entity for UncleBlock[src]

impl Entity for UncleBlockVec[src]

impl Entity for WitnessArgs[src]

Loading content...