[−][src]Trait iota_ternary_preview::raw::RawEncodingBuf
Associated Types
type Slice: RawEncoding + ?Sized
Required methods
fn new() -> Self where
Self: Sized,
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
Provided methods
fn from_trits(trits: &[<Self::Slice as RawEncoding>::Trit]) -> Self where
Self: Sized,
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>,
Self: Sized,
T: RawEncodingBuf,
T::Slice: RawEncoding<Trit = <Self::Slice as RawEncoding>::Trit>,
Convert this encoding into another encoding
Implementors
impl RawEncodingBuf for T2B1Buf
[src]
type Slice = T2B1
fn new() -> Self
[src]
fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)
[src]
fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>
[src]
fn as_slice(&self) -> &Self::Slice
[src]
fn as_slice_mut(&mut self) -> &mut Self::Slice
[src]
impl RawEncodingBuf for T3B1Buf
[src]
type Slice = T3B1
fn new() -> Self
[src]
fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)
[src]
fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>
[src]
fn as_slice(&self) -> &Self::Slice
[src]
fn as_slice_mut(&mut self) -> &mut Self::Slice
[src]
impl RawEncodingBuf for T4B1Buf
[src]
type Slice = T4B1
fn new() -> Self
[src]
fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)
[src]
fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>
[src]
fn as_slice(&self) -> &Self::Slice
[src]
fn as_slice_mut(&mut self) -> &mut Self::Slice
[src]
impl RawEncodingBuf for T5B1Buf
[src]
type Slice = T5B1
fn new() -> Self
[src]
fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)
[src]
fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>
[src]
fn as_slice(&self) -> &Self::Slice
[src]
fn as_slice_mut(&mut self) -> &mut Self::Slice
[src]
impl<T> RawEncodingBuf for T1B1Buf<T> where
T: Trit,
[src]
T: Trit,