Struct BigInt

#[repr(transparent)]
pub struct BigInt { /* private fields */ }

Implementations

impl BigInt

fn to_locale_string(&self, locales: &JsValue, options: &JsValue) -> JsString

Returns a string with a language-sensitive representation of this BigInt value. Overrides the Object.prototype.toLocaleString() method.

MDN documentation

impl BigInt

fn to_string(&self, radix: u8) -> Result<JsString, RangeError>

Returns a string representing this BigInt value in the specified radix (base). Overrides the Object.prototype.toString() method.

MDN documentation

impl BigInt

fn new(value: &JsValue) -> Result<BigInt, Error>

Creates a new BigInt value.

MDN documentation

fn checked_div(&self, rhs: &Self) -> Result<Self, RangeError>

Applies the binary / JS operator on two BigInts, catching and returning any RangeError thrown.

MDN documentation

fn pow(&self, rhs: &Self) -> Self

Applies the binary ** JS operator on the two BigInts.

MDN documentation

impl BigInt

fn as_int_n(bits: f64, bigint: &BigInt) -> BigInt

Clamps a BigInt value to a signed integer value, and returns that value.

MDN documentation

impl BigInt

fn value_of(&self, radix: u8) -> BigInt

Returns this BigInt value. Overrides the Object.prototype.valueOf() method.

MDN documentation

impl BigInt

fn as_uint_n(bits: f64, bigint: &BigInt) -> BigInt

Clamps a BigInt value to an unsigned integer value, and returns that value.

MDN documentation

Trait Implementations

impl Add for BigInt

type Output = <&'static BigInt as Add>::Output;
fn add(self, other: BigInt) -> Self::Output

impl Add<&BigInt> for BigInt

type Output = <&'static BigInt as Add>::Output;
fn add(self, other: &BigInt) -> Self::Output

impl AsRef<BigInt> for BigInt

fn as_ref(&self) -> &BigInt

impl AsRef<JsValue> for BigInt

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for BigInt

fn as_ref(&self) -> &Object

impl Binary for BigInt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl BitAnd for BigInt

type Output = <&'static BigInt as BitAnd>::Output;
fn bitand(self, other: BigInt) -> Self::Output

impl BitAnd<&BigInt> for BigInt

type Output = <&'static BigInt as BitAnd>::Output;
fn bitand(self, other: &BigInt) -> Self::Output

impl BitOr for BigInt

type Output = <&'static BigInt as BitOr>::Output;
fn bitor(self, other: BigInt) -> Self::Output

impl BitOr<&BigInt> for BigInt

type Output = <&'static BigInt as BitOr>::Output;
fn bitor(self, other: &BigInt) -> Self::Output

impl BitXor for BigInt

type Output = <&'static BigInt as BitXor>::Output;
fn bitxor(self, other: BigInt) -> Self::Output

impl BitXor<&BigInt> for BigInt

type Output = <&'static BigInt as BitXor>::Output;
fn bitxor(self, other: &BigInt) -> Self::Output

impl Clone for BigInt

fn clone(&self) -> Self

impl Debug for BigInt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for BigInt

fn default() -> Self

impl Deref for BigInt

type Target = Object;
fn deref(&self) -> &Object

impl Display for BigInt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Div for BigInt

type Output = <&'static BigInt as Div>::Output;
fn div(self, other: BigInt) -> Self::Output

impl Div<&BigInt> for BigInt

type Output = <&'static BigInt as Div>::Output;
fn div(self, other: &BigInt) -> Self::Output

impl Eq for BigInt

impl ErasableGeneric for BigInt

type Repr = JsValue;

impl From<JsValue> for BigInt

fn from(obj: JsValue) -> Self

impl From<i128> for BigInt

fn from(x: i128) -> BigInt

impl From<i16> for BigInt

fn from(x: i16) -> BigInt

impl From<i32> for BigInt

fn from(x: i32) -> BigInt

impl From<i64> for BigInt

fn from(x: i64) -> BigInt

impl From<i8> for BigInt

fn from(x: i8) -> BigInt

impl From<isize> for BigInt

fn from(x: isize) -> BigInt

impl From<u128> for BigInt

fn from(x: u128) -> BigInt

impl From<u16> for BigInt

fn from(x: u16) -> BigInt

impl From<u32> for BigInt

fn from(x: u32) -> BigInt

impl From<u64> for BigInt

fn from(x: u64) -> BigInt

impl From<u8> for BigInt

fn from(x: u8) -> BigInt

impl From<usize> for BigInt

fn from(x: usize) -> BigInt

impl FromStr for BigInt

type Err = Error;
fn from_str(s: &str) -> Result<Self, Self::Err>

impl FromWasmAbi for BigInt

type Abi = <JsValue as FromWasmAbi>::Abi;
unsafe fn from_abi(js: Self::Abi) -> Self

impl IntoJsGeneric for BigInt where BigInt: JsGeneric,

type JsCanon = BigInt;
fn to_js(self) -> BigInt

impl IntoWasmAbi for BigInt

type Abi = <JsValue as IntoWasmAbi>::Abi;
fn into_abi(self) -> Self::Abi

impl JsCast for BigInt

fn instanceof(val: &JsValue) -> bool
fn is_type_of(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self

impl LongRefFromWasmAbi for BigInt

type Abi = <JsValue as LongRefFromWasmAbi>::Abi;
type Anchor = BigInt;
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

impl LowerHex for BigInt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Mul for BigInt

type Output = <&'static BigInt as Mul>::Output;
fn mul(self, other: BigInt) -> Self::Output

impl Mul<&BigInt> for BigInt

type Output = <&'static BigInt as Mul>::Output;
fn mul(self, other: &BigInt) -> Self::Output

impl Neg for BigInt

type Output = <&'static BigInt as Neg>::Output;
fn neg(self) -> Self::Output

impl Not for BigInt

type Output = <&'static BigInt as Not>::Output;
fn not(self) -> Self::Output

impl Octal for BigInt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl OptionFromWasmAbi for BigInt

fn is_none(abi: &Self::Abi) -> bool

impl OptionIntoWasmAbi for BigInt

fn none() -> Self::Abi

impl Ord for BigInt

fn cmp(&self, other: &Self) -> Ordering

impl PartialEq for BigInt

fn eq(&self, other: &Self) -> bool

impl PartialEq<Number> for BigInt

fn eq(&self, other: &Number) -> bool

impl PartialEq<i128> for BigInt

fn eq(&self, other: &i128) -> bool

impl PartialEq<i16> for BigInt

fn eq(&self, other: &i16) -> bool

impl PartialEq<i32> for BigInt

fn eq(&self, other: &i32) -> bool

impl PartialEq<i64> for BigInt

fn eq(&self, other: &i64) -> bool

impl PartialEq<i8> for BigInt

fn eq(&self, other: &i8) -> bool

impl PartialEq<isize> for BigInt

fn eq(&self, other: &isize) -> bool

impl PartialEq<u128> for BigInt

fn eq(&self, other: &u128) -> bool

impl PartialEq<u16> for BigInt

fn eq(&self, other: &u16) -> bool

impl PartialEq<u32> for BigInt

fn eq(&self, other: &u32) -> bool

impl PartialEq<u64> for BigInt

fn eq(&self, other: &u64) -> bool

impl PartialEq<u8> for BigInt

fn eq(&self, other: &u8) -> bool

impl PartialEq<usize> for BigInt

fn eq(&self, other: &usize) -> bool

impl PartialOrd for BigInt

fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn lt(&self, other: &Self) -> bool
fn le(&self, other: &Self) -> bool
fn ge(&self, other: &Self) -> bool
fn gt(&self, other: &Self) -> bool

impl Product for BigInt

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

impl Promising for BigInt

type Resolution = BigInt;

impl RefFromWasmAbi for BigInt

type Abi = <JsValue as RefFromWasmAbi>::Abi;
type Anchor = ManuallyDrop<BigInt>;
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

impl Rem for BigInt

type Output = <&'static BigInt as Rem>::Output;
fn rem(self, other: BigInt) -> Self::Output

impl Rem<&BigInt> for BigInt

type Output = <&'static BigInt as Rem>::Output;
fn rem(self, other: &BigInt) -> Self::Output

impl Shl for BigInt

type Output = <&'static BigInt as Shl>::Output;
fn shl(self, other: BigInt) -> Self::Output

impl Shl<&BigInt> for BigInt

type Output = <&'static BigInt as Shl>::Output;
fn shl(self, other: &BigInt) -> Self::Output

impl Shr for BigInt

type Output = <&'static BigInt as Shr>::Output;
fn shr(self, other: BigInt) -> Self::Output

impl Shr<&BigInt> for BigInt

type Output = <&'static BigInt as Shr>::Output;
fn shr(self, other: &BigInt) -> Self::Output

impl StructuralPartialEq for BigInt

impl Sub for BigInt

type Output = <&'static BigInt as Sub>::Output;
fn sub(self, other: BigInt) -> Self::Output

impl Sub<&BigInt> for BigInt

type Output = <&'static BigInt as Sub>::Output;
fn sub(self, other: &BigInt) -> Self::Output

impl Sum for BigInt

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

impl UpcastFrom<BigInt> for BigInt

impl UpperHex for BigInt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl WasmDescribe for BigInt

fn describe()

impl<'a> Product<&'a BigInt> for BigInt

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

impl<'a> Sum<&'a BigInt> for BigInt

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Auto Trait Implementations

impl Freeze for BigInt

impl RefUnwindSafe for BigInt

impl Send for BigInt

impl Sync for BigInt

impl Unpin for BigInt

impl UnsafeUnpin for BigInt

impl UnwindSafe for BigInt

Blanket Implementations

impl<P, T> Receiver for BigInt where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for BigInt where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for BigInt where T: 'static + ?Sized,

impl<T> Borrow<T> for BigInt where T: ?Sized,

impl<T> BorrowMut<T> for BigInt where T: ?Sized,

impl<T> CloneToUninit for BigInt where T: Clone,

impl<T> From<T> for BigInt

impl<T> JsGeneric for BigInt where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for BigInt where T: IntoWasmAbi,

impl<T> ToOwned for BigInt where T: Clone,

impl<T> ToString for BigInt where T: Display + ?Sized,

impl<T> TryFromJsValue for BigInt where T: JsCast,

impl<T> VectorFromWasmAbi for BigInt where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for BigInt where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for BigInt where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for BigInt where U: From<T>,

impl<T, U> TryFrom<U> for BigInt where U: Into<T>,

impl<T, U> TryInto<U> for BigInt where U: TryFrom<T>,