Skip to main content

DefaultFn

Trait DefaultFn 

Source
pub trait DefaultFn<A, I, T>: Send + 'static {
    // Required method
    fn execute(&self, scope: &mut Scope<I>) -> Result<Option<T>>;
}
Expand description

Default function.

Required Methods§

Source

fn execute(&self, scope: &mut Scope<I>) -> Result<Option<T>>

Executes the default function.

§Errors

This method returns an error if the function fails to execute.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F, R, I, T> DefaultFn<ForId, I, T> for F
where F: Fn(&I) -> R + Send + 'static, R: IntoResult<Option<T>>, I: Display,

Source§

impl<F, R, I, T> DefaultFn<ForKey, I, T> for F
where F: Fn(&Key<I>) -> R + Send + 'static, R: IntoResult<Option<T>>, I: Display,

Source§

impl<F, R, I, T> DefaultFn<ForScope, I, T> for F
where F: Fn(&mut Scope<I>) -> R + Send + 'static, R: IntoResult<Option<T>>, I: Display,

Source§

impl<F, R, I, T> DefaultFn<ForValue, I, T> for F
where F: Fn() -> R + Send + 'static, R: IntoResult<Option<T>>, I: Display,