/// global metadata. If the rule is applicable to the subtree, it should return `Some(<new_tree>)`,
/// As the engine traverses the tree (in left-most, outer-most order), it will apply rules to each
/// If a rule is applicable to the given node/subtree (i.e. can transform it), then it should return
/// the resulting new subtree, which will be inserted into the tree in place of the original node.
/// The [`Commands`] instance passed to the rule can be used to apply side-effects after the rule
/// has been applied. This can be used to update global metadata, or to apply transformations to the
pub(crate) fn apply_into_update<T, M, R>(rule: &R, subtree: &T, meta: &M) -> Option<Update<T, M>>
/// Casting an `fn` pointer or closure to this type allows it to be passed to the engine alongside
/// Casting an `fn` pointer or closure to this type allows it to be passed to the engine alongside