Trait mica_hl::ForeignFunction
source · [−]pub trait ForeignFunction<V> {
fn parameter_count() -> Option<u16>;
fn into_raw_foreign_function(self) -> RawForeignFunction;
}
Expand description
A Rust function that can be called from Mica.
To spare you the time needed to decipher the absolutely unreadable macro-generated implementations of this trait, functions with the following signatures are supported:
- Constant number of type checked arguments
fn (A, B, C, ...) -> R
where- Each argument:
TryFromValue
R
:Into
<
Value
>
- Each argument:
fn (A, B, C, ...) -> Result<R, E>
- Each argument:
TryFromValue
R
:Into
<
Value
>
- Each argument:
fn (Self, A, B, C, ...) -> R
whereSelf
:SelfFromRawValue
orMutSelfFromRawValue
- Each argument after
Self
:TryFromValue
R
:Into
<
Value
>
fn (Self, A, B, C, ...) -> Result<R, E>
Self
:SelfFromRawValue
orMutSelfFromRawValue
- Each argument after
Self
:TryFromValue
R
:Into
<
Value
>
- Due to a limitation in Rust’s type system, a maximum of 8 arguments is supported now. If more is needed, use the varargs versions described below.
- Variable number of dynamically typed arguments
The generic parameter V
is not used inside the trait. Its only purpose is to allow for
multiple overlapping implementations of a trait for the same type. See ffvariants
for more
information.
Required Methods
sourcefn parameter_count() -> Option<u16>
fn parameter_count() -> Option<u16>
Returns the number of parameters this function has, or None
if the function accepts a
variable number of arguments.
The default implementation returns None
.
sourcefn into_raw_foreign_function(self) -> RawForeignFunction
fn into_raw_foreign_function(self) -> RawForeignFunction
Converts the function to a RawForeignFunction
.
Implementors
impl<Ret, Err, F> ForeignFunction<VarargsFallible> for Fwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
F: FnMut(Arguments<'_>) -> Result<Ret, Err> + 'static,
Implementation for a variable number of arguments.
impl<Ret, Err, Fun> ForeignFunction<Fallible<()>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut() -> Result<Ret, Err> + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun> ForeignFunction<FallibleRawSelf<()>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>) -> Result<Ret, Err> + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A> ForeignFunction<Fallible<(A,)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A> ForeignFunction<FallibleRawSelf<(A,)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B> ForeignFunction<Fallible<(A, B)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B> ForeignFunction<FallibleRawSelf<(A, B)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C> ForeignFunction<Fallible<(A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B, C) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C> ForeignFunction<FallibleRawSelf<(A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D> ForeignFunction<Fallible<(A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B, C, D) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D> ForeignFunction<FallibleRawSelf<(A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E> ForeignFunction<Fallible<(A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B, C, D, E) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E> ForeignFunction<FallibleRawSelf<(A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E, F> ForeignFunction<Fallible<(A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B, C, D, E, F) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E, F> ForeignFunction<FallibleRawSelf<(A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E, F) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E, F, G> ForeignFunction<Fallible<(A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B, C, D, E, F, G) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E, F, G> ForeignFunction<FallibleRawSelf<(A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E, F, G) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E, F, G, H> ForeignFunction<Fallible<(A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(A, B, C, D, E, F, G, H) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Err, Fun, A, B, C, D, E, F, G, H> ForeignFunction<FallibleRawSelf<(A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E, F, G, H) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, F> ForeignFunction<VarargsInfallible> for Fwhere
Ret: Into<Value> + 'static,
F: FnMut(Arguments<'_>) -> Ret + 'static,
Implementation for a variable number of arguments.
impl<Ret, Fun> ForeignFunction<Infallible<()>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut() -> Ret + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun> ForeignFunction<InfallibleRawSelf<()>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>) -> Ret + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A> ForeignFunction<Infallible<(A,)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A) -> Ret + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A> ForeignFunction<InfallibleRawSelf<(A,)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A) -> Ret + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B> ForeignFunction<Infallible<(A, B)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B> ForeignFunction<InfallibleRawSelf<(A, B)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C> ForeignFunction<Infallible<(A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B, C) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C> ForeignFunction<InfallibleRawSelf<(A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D> ForeignFunction<Infallible<(A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B, C, D) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D> ForeignFunction<InfallibleRawSelf<(A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E> ForeignFunction<Infallible<(A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B, C, D, E) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E> ForeignFunction<InfallibleRawSelf<(A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E, F> ForeignFunction<Infallible<(A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B, C, D, E, F) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E, F> ForeignFunction<InfallibleRawSelf<(A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E, F) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E, F, G> ForeignFunction<Infallible<(A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B, C, D, E, F, G) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E, F, G> ForeignFunction<InfallibleRawSelf<(A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E, F, G) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E, F, G, H> ForeignFunction<Infallible<(A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(A, B, C, D, E, F, G, H) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<Ret, Fun, A, B, C, D, E, F, G, H> ForeignFunction<InfallibleRawSelf<(A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
Fun: FnMut(RawSelf<'_>, A, B, C, D, E, F, G, H) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S,)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S) -> Result<Ret, Err> + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S,)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S) -> Result<Ret, Err> + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E, F> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E, F) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E, F> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E, F) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E, F, G> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E, F, G) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E, F, G> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E, F, G) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E, F, G, H> ForeignFunction<FallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E, F, G, H) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Err, Fun, A, B, C, D, E, F, G, H> ForeignFunction<FallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
Err: Error + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E, F, G, H) -> Result<Ret, Err> + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S,)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S) -> Ret + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S,)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S) -> Ret + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A) -> Ret + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A) -> Ret + 'static,
A: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B, C)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E, F> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E, F) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E, F> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E, F)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E, F) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E, F, G> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E, F, G) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E, F, G> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E, F, G)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E, F, G) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E, F, G, H> ForeignFunction<InfallibleSelf<ImmutableSelf<S>, (&S, A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
S: SelfFromRawValue + 'static,
Fun: FnMut(&S, A, B, C, D, E, F, G, H) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.
impl<S, Ret, Fun, A, B, C, D, E, F, G, H> ForeignFunction<InfallibleSelf<MutableSelf<S>, (&mut S, A, B, C, D, E, F, G, H)>> for Funwhere
Ret: Into<Value> + 'static,
S: MutSelfFromRawValue + 'static,
Fun: FnMut(&mut S, A, B, C, D, E, F, G, H) -> Ret + 'static,
A: TryFromValue + 'static,
B: TryFromValue + 'static,
C: TryFromValue + 'static,
D: TryFromValue + 'static,
E: TryFromValue + 'static,
F: TryFromValue + 'static,
G: TryFromValue + 'static,
H: TryFromValue + 'static,
Implementation for a static number of arguments.