Function d20::roll_dice [] [src]

pub fn roll_dice<'a>(s: &'a str) -> Result<Roll, &'a str>

Evaluates the expression string input as a die roll expression (e.g. 3d6 + 4). The results are returned in a Result object that contains either a valid Roll or some text indicating why the function was unable to roll the dice / evaluate the expression.