[][src]Struct ecmascript::vm::value::number::Number

pub struct Number(pub f64);

Methods

impl Number[src]

pub const MAX_SAFE_INTEGER: Number[src]

pub const MIN_SAFE_INTEGER: Number[src]

pub const MAX_VALUE: Number[src]

pub const MIN_VALUE: Number[src]

pub const NAN: Number[src]

pub const EPSILON: Number[src]

pub const NEGATIVE_INFINITY: Number[src]

pub const POSITIVE_INFINITY: Number[src]

pub fn toInteger(&self) -> Number[src]

pub fn toInt8(&self) -> i8[src]

pub fn toInt16(&self) -> i16[src]

pub fn toInt32(&self) -> i32[src]

pub fn toUint8(&self) -> u8[src]

pub fn toUint16(&self) -> u16[src]

pub fn toUint32(&self) -> u32[src]

pub fn toUint8Clamp(&self) -> u8[src]

pub fn toExponential(&self, fraction_digits: &Value) -> Result<String, Error>[src]

pub fn toPrecision(&self, precision: &Value) -> Result<String, Error>[src]

pub fn toFixed(&self, fraction_digits: &Value) -> Result<String, Error>[src]

pub fn pow(&self, exponent: &Number) -> Number[src]

pub fn unary_plus(&self) -> Number[src]

Trait Implementations

impl Copy for Number[src]

impl PartialEq<Number> for Number[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Number[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for Number[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl From<Number> for Boolean[src]

impl From<u8> for Number[src]

impl From<u16> for Number[src]

impl From<u32> for Number[src]

impl From<u64> for Number[src]

impl From<i8> for Number[src]

impl From<i16> for Number[src]

impl From<i32> for Number[src]

impl From<i64> for Number[src]

impl From<isize> for Number[src]

impl From<usize> for Number[src]

impl From<f32> for Number[src]

impl From<f64> for Number[src]

impl From<bool> for Number[src]

impl From<Undefined> for Number[src]

impl From<Null> for Number[src]

impl From<Boolean> for Number[src]

impl From<String> for Number[src]

impl<'a> From<&'a String> for Number[src]

impl From<Object> for Number[src]

impl<'a> From<&'a Object> for Number[src]

impl From<Number> for String[src]

impl<'a> From<&'a Number> for String[src]

impl From<Number> for Value[src]

impl Eq for Number[src]

impl Into<bool> for Number[src]

impl Into<i8> for Number[src]

impl Into<i16> for Number[src]

impl Into<i32> for Number[src]

impl Into<i64> for Number[src]

impl Into<isize> for Number[src]

impl Into<u8> for Number[src]

impl Into<u16> for Number[src]

impl Into<u32> for Number[src]

impl Into<u64> for Number[src]

impl Into<f64> for Number[src]

impl Into<usize> for Number[src]

impl PartialOrd<Number> for Number[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Display for Number[src]

impl Debug for Number[src]

impl Sub<Number> for Number[src]

type Output = Number

The resulting type after applying the - operator.

impl<'a> Sub<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the - operator.

impl Div<Number> for Number[src]

type Output = Number

The resulting type after applying the / operator.

impl<'a> Div<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the / operator.

impl Add<Number> for Number[src]

type Output = Number

The resulting type after applying the + operator.

impl<'a> Add<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the + operator.

impl Mul<Number> for Number[src]

type Output = Number

The resulting type after applying the * operator.

impl<'a> Mul<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the * operator.

impl Rem<Number> for Number[src]

type Output = Number

The resulting type after applying the % operator.

impl<'a> Rem<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the % operator.

impl Neg for Number[src]

type Output = Number

The resulting type after applying the - operator.

impl Shl<Number> for Number[src]

type Output = Number

The resulting type after applying the << operator.

impl<'a> Shl<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the << operator.

impl Shr<Number> for Number[src]

type Output = Number

The resulting type after applying the >> operator.

impl<'a> Shr<&'a Number> for &'a Number[src]

type Output = Number

The resulting type after applying the >> operator.

impl Hash for Number[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Number

impl Sync for Number

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[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]