Trait aftermath::Func

source ·
pub trait Func {
    fn call(
        &self,
        context: &Context,
        args: Arguments<'_, '_, '_, '_>
    ) -> Result<Complex64, CalcError>; }
Expand description

Describe an mathematical function that can be used in the expressions evaluated

Required Methods§

The entry point of a user-defined function it will be called when you it is encountered

The arguments are lazily calculated (but can be calculated at once and returned as a vec using into_vec)

Errors

You can return errors (and should if needed) The CalcError enum provides an boxed error variant to return custom error

Implementors§