#[repr(u8)]pub enum TernaryCode {
Neg = 0,
Zero = 1,
Pos = 2,
}Expand description
Ternary weight code for 2-bit encoding.
Variants§
Neg = 0
Negative weight (-1): bit pattern 0b00.
Zero = 1
Zero weight (0): bit pattern 0b01.
Pos = 2
Positive weight (+1): bit pattern 0b10.
Implementations§
Trait Implementations§
Source§impl Clone for TernaryCode
impl Clone for TernaryCode
Source§fn clone(&self) -> TernaryCode
fn clone(&self) -> TernaryCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TernaryCode
impl Debug for TernaryCode
Source§impl PartialEq for TernaryCode
impl PartialEq for TernaryCode
Source§fn eq(&self, other: &TernaryCode) -> bool
fn eq(&self, other: &TernaryCode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TernaryCode
impl Eq for TernaryCode
impl StructuralPartialEq for TernaryCode
Auto Trait Implementations§
impl Freeze for TernaryCode
impl RefUnwindSafe for TernaryCode
impl Send for TernaryCode
impl Sync for TernaryCode
impl Unpin for TernaryCode
impl UnsafeUnpin for TernaryCode
impl UnwindSafe for TernaryCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more