Closed vsbogd closed 3 weeks ago
Straightforward change to separate Grounded::execute method in a same way Grounded::match_ is separated.
Grounded::execute
Grounded::match_
trait Grounded { fn execute(...) -> ...; }
by
trait Grounded { as_execute(&self) -> Option<&dyn CustomExecute> } trait CustomExecute { fn execute(...) -> ...; }
Using such interface one can check whether atom is executable in advance without executing it. Main change is inside lib/src/atom/mod.rs all other changes are moving old code according new interface.
lib/src/atom/mod.rs
Luke, thanks for reviewing this!
Straightforward change to separate
Grounded::execute
method in a same wayGrounded::match_
is separated.by
Using such interface one can check whether atom is executable in advance without executing it. Main change is inside
lib/src/atom/mod.rs
all other changes are moving old code according new interface.