Skip to main content

Evaluatable

Trait Evaluatable 

Source
pub trait Evaluatable {
    // Required method
    fn eval(
        &self,
        shell: &mut Shell<impl ShellExtensions>,
    ) -> Result<i64, EvalError>;
}
Expand description

Trait implemented by evaluatable arithmetic expressions.

Required Methods§

Source

fn eval( &self, shell: &mut Shell<impl ShellExtensions>, ) -> Result<i64, EvalError>

Evaluate the given arithmetic expression, returning the resulting numeric value.

§Arguments
  • shell - The shell to use for evaluation.
§Errors

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§