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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§