Trait lamcal::inspect::Inspect[][src]

pub trait Inspect {
    fn inspect(&mut self, term: &Term) -> Stop;
}

The inspect trait allows to inspect the current term before each step during processing of a term and conditionally stop further processing.

This trait can be used to trace the terms before each step during processing or to limit the number of steps being executed on some condition like the number of steps performed so far.

The inspect function can hold some state and modify it according to the implemented logic.

Required Methods

Inspects the term before the next step during processing and returns whether to continue processing or to stop it.

If Stop::Yes is returned the processing will stop immediately without performing the next step.

Implementors