[][src]Trait molecule::prelude::Entity

pub trait Entity: Debug + Default + Clone {
    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]) -> VerificationResult<Self>;
fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>;
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

Important traits for &'_ mut [u8]
fn as_slice(&self) -> &[u8]

fn from_slice(slice: &[u8]) -> VerificationResult<Self>

fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>

fn new_builder() -> Self::Builder

fn as_builder(self) -> Self::Builder

Loading content...

Implementors

Loading content...