pub trait Cost<'a, Ctx> {
    type Param;

    fn cost(&'a self, param: Self::Param) -> Price;
}
Expand description

Cost of using a dice program in a given context.

Required Associated Types

A runtime parameter for extra context information, should the Ctx type argument be insufficient for determining the cost of handling dice expressions in a given context. Where unimportant, this should be ().

Required Methods

Implementors