Struct rquickjs_core::function::StaticJsFn
source · pub struct StaticJsFn(/* private fields */);
Expand description
A static class method for making function object like classes.
You can quickly create an StaticJsFn
from any function by using the static_fn
macro.
Implementations§
source§impl StaticJsFn
impl StaticJsFn
sourcepub fn new<F: StaticJsFunction>() -> Self
pub fn new<F: StaticJsFunction>() -> Self
Create a new class fn object from a type implementing the StaticJsFunction
trait.
Trait Implementations§
source§impl Clone for StaticJsFn
impl Clone for StaticJsFn
source§fn clone(&self) -> StaticJsFn
fn clone(&self) -> StaticJsFn
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StaticJsFn
impl Debug for StaticJsFn
source§impl PartialEq for StaticJsFn
impl PartialEq for StaticJsFn
source§fn eq(&self, other: &StaticJsFn) -> bool
fn eq(&self, other: &StaticJsFn) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for StaticJsFn
impl Eq for StaticJsFn
impl StructuralPartialEq for StaticJsFn
Auto Trait Implementations§
impl Freeze for StaticJsFn
impl RefUnwindSafe for StaticJsFn
impl Send for StaticJsFn
impl Sync for StaticJsFn
impl Unpin for StaticJsFn
impl UnwindSafe for StaticJsFn
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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