Trait taffy::util::resolve::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§
sourcefn maybe_resolve(self, context: In) -> Out
fn maybe_resolve(self, context: In) -> Out
Resolve a dimension that might be dependent on a context, with None
as fallback value