pub trait ComputeContentParam: SystemParam + 'static{
type Components: ReadOnlyWorldQuery + 'static;
// Required method
fn condition(label: ContentSizedComputeSystem<Self>) -> SystemSetConfigs;
}Expand description
The static version of whatever implements ComputeContentSize.
Without this, it would be impossible to access ComputeContentSize::Components
in the implementation.
Required Associated Types§
Sourcetype Components: ReadOnlyWorldQuery + 'static
type Components: ReadOnlyWorldQuery + 'static
Same as ComputeContentSize::Components. Make sure to copy the type here!
Required Methods§
Sourcefn condition(label: ContentSizedComputeSystem<Self>) -> SystemSetConfigs
fn condition(label: ContentSizedComputeSystem<Self>) -> SystemSetConfigs
Run condition for when to re-compute content-sized values.
I wish you could just do -> impl Condition but this isn’t stable in rust.
Note that you should consider adding .or_else(require_layout_recompute)
to your condition, as update to node size might influence computed-size
axis size.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".