[][src]Trait iota_ternary_preview::raw::RawEncodingBuf

pub trait RawEncodingBuf {
    type Slice: RawEncoding + ?Sized;
    fn new() -> Self
    where
        Self: Sized
;
fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit);
fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>;
fn as_slice(&self) -> &Self::Slice;
fn as_slice_mut(&mut self) -> &mut Self::Slice; fn from_trits(trits: &[<Self::Slice as RawEncoding>::Trit]) -> Self
    where
        Self: Sized
, { ... }
fn into_encoding<T: RawEncodingBuf>(this: TritBuf<Self>) -> TritBuf<T>
    where
        Self: Sized,
        T: RawEncodingBuf,
        T::Slice: RawEncoding<Trit = <Self::Slice as RawEncoding>::Trit>
, { ... } }

Associated Types

Loading content...

Required methods

fn new() -> Self where
    Self: Sized

Create a new empty buffer

fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)

Push a trit to the back of this buffer

fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>

Pop a trit from the back of this buffer

fn as_slice(&self) -> &Self::Slice

View the trits in this buffer as a slice

fn as_slice_mut(&mut self) -> &mut Self::Slice

View the trits in this buffer as a mutable slice

Loading content...

Provided methods

fn from_trits(trits: &[<Self::Slice as RawEncoding>::Trit]) -> Self where
    Self: Sized

Create a new buffer containing the given trits

fn into_encoding<T: RawEncodingBuf>(this: TritBuf<Self>) -> TritBuf<T> where
    Self: Sized,
    T: RawEncodingBuf,
    T::Slice: RawEncoding<Trit = <Self::Slice as RawEncoding>::Trit>, 

Convert this encoding into another encoding

Loading content...

Implementors

impl RawEncodingBuf for T2B1Buf[src]

type Slice = T2B1

impl RawEncodingBuf for T3B1Buf[src]

type Slice = T3B1

impl RawEncodingBuf for T4B1Buf[src]

type Slice = T4B1

impl RawEncodingBuf for T5B1Buf[src]

type Slice = T5B1

impl<T> RawEncodingBuf for T1B1Buf<T> where
    T: Trit
[src]

type Slice = T1B1<T>

Loading content...