Trait taffy::util::resolve::ResolveOrZero

source ·
pub trait ResolveOrZero<TContext, TOutput: TaffyZero> {
    // Required method
    fn resolve_or_zero(self, context: TContext) -> 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§

source

fn resolve_or_zero(self, context: TContext) -> TOutput

Resolve a dimension that might be dependent on a context, with a default fallback value

Implementors§