pub trait StaticRefFunction<'a, D, T> {
    type Output;

    fn call(data: &'a D, arg: T) -> Self::Output;

    fn bind(data: &'a D) -> RefFn<'a, T, Self::Output> { ... }
    fn bind_sync(data: &'a D) -> RefSyncFn<'a, T, Self::Output>
    where
        D: Sync
, { ... } }
Expand description

A trait for defining a static function will be type erased.

Required Associated Types§

Return type of the defined function.

Required Methods§

Function definition.

Provided Methods§

A helper function to create a RefFn object with the defined function.

A helper function to create a RefSyncFn object with the defined function.

Implementors§