pub struct SigRange(pub u64, pub u64);
Expand description
This represents the inclusive range of values that constitute a valid non-compact
significand in the given base. You only need to use this if manually defining a custom
base (if performance is non-critical I would recommend using the create_default_base
macro).
§Examples
use bignumbe_rs::{SigRange, Binary, Base};
let SigRange(min_sig, max_sig) = Binary::calculate_ranges().1;
// Since the range of valid significands for non-compact Binary BigNum instances is
// [2^63, 2^64), we expect a SigRange of (2^63, 2^64 - 1)
assert_eq!(min_sig, 1 << 63);
assert_eq!(max_sig, u64::MAX);
Tuple Fields§
§0: u64
§1: u64
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SigRange
impl RefUnwindSafe for SigRange
impl Send for SigRange
impl Sync for SigRange
impl Unpin for SigRange
impl UnwindSafe for SigRange
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