Trait taffy::util::MaybeResolve

source ·
pub trait MaybeResolve<In, Out> {
    // Required method
    fn maybe_resolve(self, context: In) -> Out;
}
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 None if it unable to resolve.

Required Methods§

source

fn maybe_resolve(self, context: In) -> Out

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

Implementors§