Struct bee_ternary::t3b1::T3B1Buf
source · [−]pub struct T3B1Buf(_, _);
Expand description
An encoding scheme buffer that uses a single byte to represent three trits.
Trait Implementations
sourceimpl RawEncodingBuf for T3B1Buf
impl RawEncodingBuf for T3B1Buf
sourcefn with_capacity(cap: usize) -> Self
fn with_capacity(cap: usize) -> Self
Create a new empty buffer with a given capacity.
sourcefn clear(&mut self)
fn clear(&mut self)
Clears the buffer, removing all values. Note that this method has no effect on the allocated capacity of the buffer. Read more
sourcefn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)
fn push(&mut self, trit: <Self::Slice as RawEncoding>::Trit)
Push a trit to the back of this buffer.
sourcefn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>
fn pop(&mut self) -> Option<<Self::Slice as RawEncoding>::Trit>
Pop a trit from the back of this buffer.
sourcefn as_slice_mut(&mut self) -> &mut Self::Slice
fn as_slice_mut(&mut self) -> &mut Self::Slice
View the trits in this buffer as a mutable slice.
sourcefn from_trits(trits: &[<Self::Slice as RawEncoding>::Trit]) -> Self where
Self: Sized,
fn from_trits(trits: &[<Self::Slice as RawEncoding>::Trit]) -> Self where
Self: Sized,
Create a new buffer containing the given trits.
sourcefn into_encoding<T: RawEncodingBuf>(this: TritBuf<Self>) -> TritBuf<T> where
Self: Sized,
T: RawEncodingBuf,
T::Slice: RawEncoding<Trit = <Self::Slice as RawEncoding>::Trit>,
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.
TODO: Rename this reencode
Read more
Auto Trait Implementations
impl RefUnwindSafe for T3B1Buf
impl Send for T3B1Buf
impl Sync for T3B1Buf
impl Unpin for T3B1Buf
impl UnwindSafe for T3B1Buf
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more