pub type RuleFn<T, M> = fn(&mut Commands<T, M>, &T, &M) -> Option<T>;Expand description
A uniform type for fn pointers and closures, which implements the Rule trait.
Casting an fn pointer or closure to this type allows it to be passed to the engine alongside
other such types. This is necessary since no two fn pointers or closures have the same
type, and thus cannot be stored in a single collection without casting.
See the rule_fns! macro for a convenient way to do this.
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes