pub trait UserDefinedCommand: Send + Sync {
// Required method
fn update(
&self,
egraph: &mut EGraph,
args: &[Expr],
) -> Result<Option<CommandOutput>, Error>;
}Expand description
A user-defined command allows users to inject custom command that can be called in an egglog program.
Compared to an external function, a user-defined command is more powerful because it has an exclusive access to the e-graph.