pub struct Program { /* private fields */ }
Expand description
A parsed dice program. The result of invoking parse_expression
on something like "3d6 + 4"
.
Implementations
Methods from Deref<Target = Tree<Term>>
sourcepub fn walk(&self) -> TreeWalker<'_, T>
pub fn walk(&self) -> TreeWalker<'_, T>
Create a tree walker to arbitrarily traverse the tree.
sourcepub fn postorder(&self) -> PostorderIter<'_, T> where
T: IndexNode,
pub fn postorder(&self) -> PostorderIter<'_, T> where
T: IndexNode,
Perform a postorder depth first traversal of the tree.
Currently has substantially more iteration overhead than postorder
,
but running time appears to stay inside an order of magnitude on large trees.
Trait Implementations
sourceimpl<'a> Cost<'a, StackInterp> for Program
impl<'a> Cost<'a, StackInterp> for Program
sourceimpl<'a> Cost<'a, TextFormatOutput<Default>> for Program
impl<'a> Cost<'a, TextFormatOutput<Default>> for Program
Auto Trait Implementations
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more