#[repr(transparent)]
pub struct SelfMethod<S, F>(pub F, _);
Expand description

A method which takes a class type as a self argument.

Tuple Fields§

§0: F

Trait Implementations§

source§

impl<'js, F, R, T> AsFunction<'js, (T,), R> for SelfMethod<T, F>where F: Fn(&T) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<'js, F, R, T, A> AsFunction<'js, (T, A), R> for SelfMethod<T, F>where F: Fn(&T, A) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js, A: FromInput<'js>,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<'js, F, R, T, A, B> AsFunction<'js, (T, A, B), R> for SelfMethod<T, F>where F: Fn(&T, A, B) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js, A: FromInput<'js>, B: FromInput<'js>,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<'js, F, R, T, A, B, D> AsFunction<'js, (T, A, B, D), R> for SelfMethod<T, F>where F: Fn(&T, A, B, D) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js, A: FromInput<'js>, B: FromInput<'js>, D: FromInput<'js>,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<'js, F, R, T, A, B, D, E> AsFunction<'js, (T, A, B, D, E), R> for SelfMethod<T, F>where F: Fn(&T, A, B, D, E) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js, A: FromInput<'js>, B: FromInput<'js>, D: FromInput<'js>, E: FromInput<'js>,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<'js, F, R, T, A, B, D, E, G> AsFunction<'js, (T, A, B, D, E, G), R> for SelfMethod<T, F>where F: Fn(&T, A, B, D, E, G) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js, A: FromInput<'js>, B: FromInput<'js>, D: FromInput<'js>, E: FromInput<'js>, G: FromInput<'js>,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<'js, F, R, T, A, B, D, E, G, H> AsFunction<'js, (T, A, B, D, E, G, H), R> for SelfMethod<T, F>where F: Fn(&T, A, B, D, E, G, H) -> R + 'js, R: IntoJs<'js> + 'js, T: ClassDef + 'js, A: FromInput<'js>, B: FromInput<'js>, D: FromInput<'js>, E: FromInput<'js>, G: FromInput<'js>, H: FromInput<'js>,

source§

fn num_args() -> Range<usize>

The possible range of function arguments
source§

fn call(&self, input: &Input<'js>) -> Result<Value<'js>>

Call as JS function
source§

fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()>

Post-processing the function
source§

impl<T, F> AsRef<F> for SelfMethod<T, F>

source§

fn as_ref(&self) -> &F

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, F> Deref for SelfMethod<T, F>

§

type Target = F

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<S, F> From<F> for SelfMethod<S, F>

source§

fn from(func: F) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<S, F> RefUnwindSafe for SelfMethod<S, F>where F: RefUnwindSafe, S: RefUnwindSafe,

§

impl<S, F> Send for SelfMethod<S, F>where F: Send, S: Send,

§

impl<S, F> Sync for SelfMethod<S, F>where F: Sync, S: Sync,

§

impl<S, F> Unpin for SelfMethod<S, F>where F: Unpin, S: Unpin,

§

impl<S, F> UnwindSafe for SelfMethod<S, F>where F: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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