pub struct WithProto<'js, C>(pub C, pub Object<'js>);
Available on crate feature classes only.
Expand description

The prototype setting wrapper

This wrapper helps instantiate a class with desired prototype which is quite useful with constructors because allows class to be inheritable.

Tuple Fields

0: C1: Object<'js>

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.