pub trait ToFunctionInterface<Params, Return>: 'static {
    // Required method
    fn to_normalized_function(self) -> NormalizedFunction;
}
Expand description

This trait can convert functions into compatible interface functions

Required Methods§

Implementors§

source§

impl ToFunctionInterface<(), ()> for NormalizedFunction

source§

impl<Function, Return> ToFunctionInterface<(&FunctionContext<'_, '_, '_>,), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>) -> Return + 'static, Return: ValidReturnType,

With non-mut function context

source§

impl<Function, Return> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &[ObjectRef]), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &[ObjectRef]) -> Return + 'static, Return: ValidReturnType,

source§

impl<Function, Return> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>,), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>) -> Return + 'static, Return: ValidReturnType,

With mut function context

source§

impl<Function, Return> ToFunctionInterface<(), Return> for Functionwhere Function: Fn() -> Return + 'static, Return: ValidReturnType,

Without function context

source§

impl<Function, Return, A> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload,

With mut function context

source§

impl<Function, Return, A> ToFunctionInterface<&A, Return> for Functionwhere Function: Fn(&A) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B> ToFunctionInterface<(&A, &B), Return> for Functionwhere Function: Fn(&A, &B) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B, C> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B, &C), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B, &C) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B, C> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B, &C), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B, &C) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B, C> ToFunctionInterface<(&A, &B, &C), Return> for Functionwhere Function: Fn(&A, &B, &C) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B, C, D> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B, C, D> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B, C, D> ToFunctionInterface<(&A, &B, &C, &D), Return> for Functionwhere Function: Fn(&A, &B, &C, &D) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B, C, D, E> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B, C, D, E> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B, C, D, E> ToFunctionInterface<(&A, &B, &C, &D, &E), Return> for Functionwhere Function: Fn(&A, &B, &C, &D, &E) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B, C, D, E, F> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B, C, D, E, F> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B, C, D, E, F> ToFunctionInterface<(&A, &B, &C, &D, &E, &F), Return> for Functionwhere Function: Fn(&A, &B, &C, &D, &E, &F) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B, C, D, E, F, G> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload, G: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B, C, D, E, F, G> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload, G: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B, C, D, E, F, G> ToFunctionInterface<(&A, &B, &C, &D, &E, &F, &G), Return> for Functionwhere Function: Fn(&A, &B, &C, &D, &E, &F, &G) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload, G: ObjectPayload,

Without function context

source§

impl<Function, Return, A, B, C, D, E, F, G, H> ToFunctionInterface<(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G, &H), Return> for Functionwhere Function: Fn(&FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G, &H) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload, G: ObjectPayload, H: ObjectPayload,

With non-mut function context

source§

impl<Function, Return, A, B, C, D, E, F, G, H> ToFunctionInterface<(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G, &H), Return> for Functionwhere Function: Fn(&mut FunctionContext<'_, '_, '_>, &A, &B, &C, &D, &E, &F, &G, &H) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload, G: ObjectPayload, H: ObjectPayload,

With mut function context

source§

impl<Function, Return, A, B, C, D, E, F, G, H> ToFunctionInterface<(&A, &B, &C, &D, &E, &F, &G, &H), Return> for Functionwhere Function: Fn(&A, &B, &C, &D, &E, &F, &G, &H) -> Return + 'static, Return: ValidReturnType, A: ObjectPayload, B: ObjectPayload, C: ObjectPayload, D: ObjectPayload, E: ObjectPayload, F: ObjectPayload, G: ObjectPayload, H: ObjectPayload,

Without function context