Struct Performance

Source
pub struct Performance { /* private fields */ }

Implementations§

Source§

impl Performance

Source

pub const js_now: __impl_now = __impl_now

Source§

impl Performance

Source

pub fn now(self) -> u64

Source

pub fn time_origin(self) -> u64

Source

pub fn new() -> Result<Self>

Trait Implementations§

Source§

impl Clone for Performance

Source§

fn clone(&self) -> Self

Returns a duplicate 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<'js> ConstructorCreator<'js, Performance> for ConstructorCreate<Performance>

Source§

fn create_constructor(&self, ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>

Source§

impl Debug for Performance

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<(Clock, Instant)> for Performance

Source§

fn from(value: (Clock, Instant)) -> Self

Converts to this type from the input type.
Source§

impl From<Performance> for (Clock, Instant)

Source§

fn from(value: Performance) -> Self

Converts to this type from the input type.
Source§

impl<'js> FromJs<'js> for Performance
where for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,

Source§

fn from_js(ctx: &Ctx<'js>, value: Value<'js>) -> Result<Self>

Source§

impl<'js> IntoJs<'js> for Performance

Source§

fn into_js(self, ctx: &Ctx<'js>) -> Result<Value<'js>>

Source§

impl<'js> JsClass<'js> for Performance

Source§

const NAME: &'static str = "Performance"

The name the constructor has in JavaScript
Source§

type Mutable = Writable

Can the type be mutated while a JavaScript value. Read more
Source§

fn prototype(ctx: &Ctx<'js>) -> Result<Option<Object<'js>>>

Returns the class prototype,
Source§

fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>

Returns a predefined constructor for this specific class type if there is one.
Source§

const CALLABLE: bool = false

Is this class a function.
Source§

fn call<'a>( this: &JsCell<'js, Self>, params: Params<'a, 'js>, ) -> Result<Value<'js>, Error>

The function which will be called if Self::CALLABLE is true and an an object with this class is called as if it is a function.
Source§

impl<'js> JsLifetime<'js> for Performance

Source§

type Changed<'to> = Performance

The target which has the same type as a Self but with another lifetime 't
Source§

impl MethodImplementor<Performance> for MethodImpl<Performance>

Source§

fn implement(&self, _proto: &Object<'_>) -> Result<()>

Source§

impl<'js> Trace<'js> for Performance

Source§

fn trace<'a>(&self, _tracer: Tracer<'a, 'js>)

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'js, T> AsProperty<'js, T> for T
where T: IntoJs<'js>,

Source§

fn config( self, ctx: &Ctx<'js>, ) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>

Property configuration Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'js, T> FromParam<'js> for T
where T: FromJs<'js>,

Source§

fn param_requirement() -> ParamRequirement

The parameters requirements this value requires.
Source§

fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>

Convert from a parameter value.
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'js, T> IntoArg<'js> for T
where T: IntoJs<'js>,

Source§

fn num_args(&self) -> usize

The number of arguments this value produces.
Source§

fn into_arg(self, args: &mut Args<'js>) -> Result<(), Error>

Convert the value into an argument.
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ParallelSend for T
where T: Send,