pub type DOMHighResTimeStamp = Finite<f64>;

Aliased Type§

struct DOMHighResTimeStamp(f64);

Fields§

§0: f64

Implementations§

source§

impl<T: Float> Finite<T>

source

pub fn new(value: T) -> Option<Finite<T>>

Create a new Finite<T: Float> safely.

source

pub fn wrap(value: T) -> Finite<T>

Create a new Finite<T: Float>.

Trait Implementations§

source§

impl<T: Clone + Float> Clone for Finite<T>

source§

fn clone(&self) -> Finite<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Float + Default> Default for Finite<T>

source§

fn default() -> Finite<T>

Returns the “default value” for a type. Read more
source§

impl<T: Float> Deref for Finite<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T: Float + FromJSValConvertible<Config = ()>> FromJSValConvertible for Finite<T>

§

type Config = ()

Optional configurable behaviour switch; use () for no configuration.
source§

unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, option: () ) -> Result<ConversionResult<Finite<T>>, ()>

Convert val to type Self. Optional configuration of type T can be passed as the option argument. If it returns Err(()), a JSAPI exception is pending. If it returns Ok(Failure(reason)), there is no pending JSAPI exception.
source§

impl<T: Float + MallocSizeOf> MallocSizeOf for Finite<T>

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl<T: PartialEq + Float> PartialEq<Finite<T>> for Finite<T>

source§

fn eq(&self, other: &Finite<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Float + ToJSValConvertible> ToJSValConvertible for Finite<T>

source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

Convert self to a JSVal. JSAPI failure causes a panic.
source§

impl<T> Traceable for Finite<T>where T: JSTraceable + Float,

source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.
source§

impl<T: Copy + Float> Copy for Finite<T>

source§

impl<T: Eq + Float> Eq for Finite<T>

source§

impl<T: Float> StructuralEq for Finite<T>

source§

impl<T: Float> StructuralPartialEq for Finite<T>