pub struct Ter40(/* private fields */);
Expand description
A struct to store 40 ternary digits (~63.398 bits) value into one i64
.
Implementations§
Trait Implementations§
Source§impl DigitOperate for Ter40
impl DigitOperate for Ter40
Source§fn digit(&self, index: usize) -> Option<Digit>
fn digit(&self, index: usize) -> Option<Digit>
Returns one individual Digit ot this DigitOperate object if it exists.
Source§fn each(&self, f: impl Fn(Digit) -> Digit) -> Selfwhere
Self: Sized,
fn each(&self, f: impl Fn(Digit) -> Digit) -> Selfwhere
Self: Sized,
Applies a transformation function to each digit of the balanced ternary number,
returning a new
DigitOperate
object with the transformed digits. Read moreSource§fn each_with(&self, f: impl Fn(Digit, Digit) -> Digit, other: Digit) -> Selfwhere
Self: Sized,
fn each_with(&self, f: impl Fn(Digit, Digit) -> Digit, other: Digit) -> Selfwhere
Self: Sized,
Applies a transformation function to each digit of the balanced ternary number,
using an additional parameter for the transformation process, returning a new
DigitOperate
object with the transformed digits. Read moreSource§impl Ord for Ter40
impl Ord for Ter40
Source§impl PartialOrd for Ter40
impl PartialOrd for Ter40
impl Copy for Ter40
impl Eq for Ter40
impl StructuralPartialEq for Ter40
Auto Trait Implementations§
impl Freeze for Ter40
impl RefUnwindSafe for Ter40
impl Send for Ter40
impl Sync for Ter40
impl Unpin for Ter40
impl UnwindSafe for Ter40
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