pub trait TransitionPattern {
// Required method
fn resolve(
&self,
p: f64,
reverse: bool,
size: Size,
) -> (PatternLayer, PatternLayer);
}Expand description
Pure staging math for a keyed child switch: maps a 0.0..=1.0 transition
progress onto per-child PatternLayers for the incoming and exiting
children. See the module docs for the raw-vs-clamped progress
contract.
Object-safe by contract. The trait takes only scalar/Copy arguments
and returns a concrete (PatternLayer, PatternLayer), so any future
pattern can hold a Box<dyn TransitionPattern> without a signature change —
the size parameter is the reserved extension point for a hero-rect-bearing
container-transform pattern.
Required Methods§
Sourcefn resolve(
&self,
p: f64,
reverse: bool,
size: Size,
) -> (PatternLayer, PatternLayer)
fn resolve( &self, p: f64, reverse: bool, size: Size, ) -> (PatternLayer, PatternLayer)
Resolve (incoming, exiting) layers at transition progress p (raw —
may overshoot for a spring), reverse flipping any directional motion,
at container size.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".