pub struct BigInt {
pub size: Option<usize>,
/* private fields */
}
Fields§
§size: Option<usize>
Implementations§
source§impl BigInt
impl BigInt
pub fn new<T>(value: T, size: Option<usize>) -> BigInt
pub fn as_string(&self) -> String
pub fn from_bytes_be(bytes: &[u8]) -> BigInt
pub fn set_bit(&mut self, index: usize, value: bool)
pub fn get_bit(&self, index: usize) -> bool
pub fn min_size(&self) -> usize
pub fn size_or_min_size(&self) -> usize
pub fn sign(&self) -> isize
pub fn maybe_into<T>(&self) -> Option<T>
pub fn checked_into<T>(&self, report: &mut Report, span: Span) -> Result<T, ()>
pub fn checked_into_nonzero_usize( &self, report: &mut Report, span: Span ) -> Result<usize, ()>
pub fn checked_add( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn checked_sub( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn checked_mul( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn checked_div( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn checked_mod( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn checked_shl( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn checked_shr( &self, report: &mut Report, span: Span, rhs: &BigInt ) -> Result<BigInt, ()>
pub fn slice(&self, left: usize, right: usize) -> BigInt
pub fn checked_slice( &self, report: &mut Report, span: Span, left: usize, right: usize ) -> Result<BigInt, ()>
pub fn concat( &self, lhs_slice: (usize, usize), rhs: &BigInt, rhs_slice: (usize, usize) ) -> BigInt
pub fn convert_le(&self) -> BigInt
Trait Implementations§
source§impl Ord for BigInt
impl Ord for BigInt
source§impl PartialEq for BigInt
impl PartialEq for BigInt
source§impl PartialOrd for BigInt
impl PartialOrd for BigInt
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for BigInt
Auto Trait Implementations§
impl Freeze for BigInt
impl RefUnwindSafe for BigInt
impl Send for BigInt
impl Sync for BigInt
impl Unpin for BigInt
impl UnwindSafe for BigInt
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