Struct bee_ternary::t1b1::T1B1
source · [−]Expand description
An encoding scheme slice that uses a single byte to represent one trit.
Trait Implementations
sourceimpl<T> RawEncoding for T1B1<T> where
T: Trit,
impl<T> RawEncoding for T1B1<T> where
T: Trit,
type Trit = T
type Trit = T
The type of trit associated with this trit encoding.
sourceconst TRITS_PER_BYTE: usize
const TRITS_PER_BYTE: usize
The number of trits that fit into this trit slice encoding.
sourceunsafe fn as_i8_slice_mut(&mut self) -> &mut [i8]
unsafe fn as_i8_slice_mut(&mut self) -> &mut [i8]
Interpret the raw data of this encoding as a mutable slice of i8
.
sourceunsafe fn get_unchecked(&self, index: usize) -> Self::Trit
unsafe fn get_unchecked(&self, index: usize) -> Self::Trit
Get the trit at the given index
sourceunsafe fn set_unchecked(&mut self, index: usize, trit: Self::Trit)
unsafe fn set_unchecked(&mut self, index: usize, trit: Self::Trit)
Set the trit at the given index
sourceunsafe fn slice_unchecked(&self, range: Range<usize>) -> &Self
unsafe fn slice_unchecked(&self, range: Range<usize>) -> &Self
Get a slice of this slice
sourceunsafe fn slice_unchecked_mut(&mut self, range: Range<usize>) -> &mut Self
unsafe fn slice_unchecked_mut(&mut self, range: Range<usize>) -> &mut Self
Get a mutable slice of this slice
Auto Trait Implementations
impl<T> RefUnwindSafe for T1B1<T> where
T: RefUnwindSafe,
impl<T> Send for T1B1<T> where
T: Send,
impl<T = Btrit> !Sized for T1B1<T>
impl<T> Sync for T1B1<T> where
T: Sync,
impl<T> Unpin for T1B1<T> where
T: Unpin,
impl<T> UnwindSafe for T1B1<T> where
T: UnwindSafe,
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