[][src]Trait molecule::prelude::Reader

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

    const NAME: &'static str;

    fn verify(slice: &[u8], compatible: bool) -> VerificationResult<()>;
fn new_unchecked(slice: &'r [u8]) -> Self;
fn as_slice(&self) -> &'r [u8];
fn to_entity(&self) -> Self::Entity; fn from_slice(slice: &'r [u8]) -> VerificationResult<Self> { ... }
fn from_compatible_slice(slice: &'r [u8]) -> VerificationResult<Self> { ... } }

Associated Types

type Entity: Entity

Loading content...

Associated Constants

const NAME: &'static str

Loading content...

Required methods

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

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

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

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

Loading content...

Provided methods

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

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

Loading content...

Implementors

Loading content...