[−][src]Struct boa::builtins::bigint::BigInt
BigInt implementation.
Implementations
impl BigInt[src]
pub fn from_string_radix(buf: &str, radix: u32) -> Option<Self>[src]
Converts a string to a BigInt with the specified radix.
pub fn to_string_radix(&self, radix: u32) -> String[src]
Convert bigint to string with radix.
pub fn to_f64(&self) -> f64[src]
Converts the BigInt to a f64 type.
Returns std::f64::INFINITY if the BigInt is too big.
impl BigInt[src]
pub fn pow(self, other: &Self) -> Result<Self, String>[src]
pub fn shift_right(mut self: Self, other: Self) -> Result<Self, String>[src]
pub fn shift_left(mut self: Self, other: Self) -> Result<Self, String>[src]
pub fn mod_floor(self, other: &Self) -> Self[src]
Floored integer modulo.
Examples
assert_eq!((8).mod_floor(&3), 2); assert_eq!((8).mod_floor(&-3), -1);
Trait Implementations
impl Add<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the + operator.
pub fn add(mut self: Self, other: Self) -> Self[src]
impl BitAnd<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the & operator.
pub fn bitand(mut self: Self, other: Self) -> Self[src]
impl BitOr<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the | operator.
pub fn bitor(mut self: Self, other: Self) -> Self[src]
impl BitXor<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the ^ operator.
pub fn bitxor(mut self: Self, other: Self) -> Self[src]
impl Clone for BigInt[src]
impl Debug for BigInt[src]
impl Default for BigInt[src]
impl Display for BigInt[src]
impl Div<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the / operator.
pub fn div(mut self: Self, other: Self) -> Self[src]
impl Eq for BigInt[src]
impl Finalize for BigInt[src]
impl From<BigInt> for Const[src]
impl From<BigInt> for Numeric[src]
impl From<BigInt> for Value[src]
impl From<BigInt> for RcBigInt[src]
impl From<BigInt> for Numeric[src]
impl From<i32> for BigInt[src]
impl From<i64> for BigInt[src]
impl Hash for BigInt[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Mul<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the * operator.
pub fn mul(mut self: Self, other: Self) -> Self[src]
impl Neg for BigInt[src]
type Output = Self
The resulting type after applying the - operator.
pub fn neg(self) -> Self::Output[src]
impl Ord for BigInt[src]
pub fn cmp(&self, other: &BigInt) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<BigInt> for BigInt[src]
impl PartialEq<f64> for BigInt[src]
pub fn eq(&self, other: &f64) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialEq<i32> for BigInt[src]
pub fn eq(&self, other: &i32) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<BigInt> for BigInt[src]
pub fn partial_cmp(&self, other: &BigInt) -> Option<Ordering>[src]
pub fn lt(&self, other: &BigInt) -> bool[src]
pub fn le(&self, other: &BigInt) -> bool[src]
pub fn gt(&self, other: &BigInt) -> bool[src]
pub fn ge(&self, other: &BigInt) -> bool[src]
impl Rem<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the % operator.
pub fn rem(mut self: Self, other: Self) -> Self[src]
impl StructuralEq for BigInt[src]
impl StructuralPartialEq for BigInt[src]
impl Sub<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the - operator.
pub fn sub(mut self: Self, other: Self) -> Self[src]
impl Trace for BigInt[src]
pub unsafe fn trace(&self)[src]
pub unsafe fn root(&self)[src]
pub unsafe fn unroot(&self)[src]
pub fn finalize_glue(&self)[src]
impl TryFrom<f64> for BigInt[src]
Auto Trait Implementations
impl RefUnwindSafe for BigInt[src]
impl Send for BigInt[src]
impl Sync for BigInt[src]
impl Unpin for BigInt[src]
impl UnwindSafe for BigInt[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> NativeObject for T where
T: Any + Debug + Trace, [src]
T: Any + Debug + Trace,
pub fn as_any(&Self) -> &(dyn Any + 'static)[src]
pub fn as_mut_any(&mut Self) -> &mut (dyn Any + 'static)[src]
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, [src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,