[][src]Trait mice::util::ExpressionExt

pub trait ExpressionExt: Sealed {
    fn exceeds_cap(&self, cap: i64) -> bool;
}

An extension trait for Expression. The idea here is to provide convenience methods that could eventually be implemented solely in terms of public API.

This trait is sealed. It cannot be implemented outside this crate.

Required methods

fn exceeds_cap(&self, cap: i64) -> bool

Counts the number of evaluation steps it will take to compute a result of an expression, and returns whether that sum exceeds the given cap.

Constant terms take one step, dice terms take one step for each die. An Nd1 dice term counts as a constant term for the purpose of this sum.

Loading content...

Implementors

impl ExpressionExt for Expression[src]

Loading content...