pub trait ResolveOrZero<TContext, TOutput: TaffyZero> {
// Required method
fn resolve_or_zero(
self,
context: TContext,
calc: impl Fn(*const (), f32) -> f32,
) -> TOutput;
}Expand description
Trait to encapsulate behaviour where we need to resolve from a potentially context-dependent size or dimension into a context-independent size or dimension.
Will return a default value if it unable to resolve.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".