Skip to main content

ComputeContentParam

Trait ComputeContentParam 

Source
pub trait ComputeContentParam: SystemParam + 'static
where for<'w, 's> Self::Item<'w, 's>: ComputeContentSize<Components = Self::Components>,
{ 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§

Source

type Components: ReadOnlyWorldQuery + 'static

Same as ComputeContentSize::Components. Make sure to copy the type here!

Required Methods§

Source

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".

Implementors§