struct AutoLayoutCandidateGuess {
minimum_guess: Au,
minimum_percentage_guess: Au,
minimum_specified_guess: Au,
preferred_guess: Au,
}
Expand description
The layout “guesses” defined in INTRINSIC § 4.3.
Fields§
§minimum_guess: Au
The column inline-size assignment where each column is assigned its intrinsic minimum inline-size.
minimum_percentage_guess: Au
The column inline-size assignment where:
- A column with an intrinsic percentage inline-size greater than 0% is assigned the
larger of:
- Its intrinsic percentage inline-size times the assignable inline-size;
- Its intrinsic minimum inline-size;
- Other columns receive their intrinsic minimum inline-size.
minimum_specified_guess: Au
The column inline-size assignment where:
- Each column with an intrinsic percentage inline-size greater than 0% is assigned the
larger of:
- Its intrinsic percentage inline-size times the assignable inline-size;
- Its intrinsic minimum inline-size;
- Any other column that is constrained is assigned its intrinsic preferred inline-size;
- Other columns are assigned their intrinsic minimum inline-size.
preferred_guess: Au
The column inline-size assignment where:
- Each column with an intrinsic percentage inline-size greater than 0% is assigned the
larger of:
- Its intrinsic percentage inline-size times the assignable inline-size;
- Its intrinsic minimum inline-size;
- Other columns are assigned their intrinsic preferred inline-size.
Implementations§
source§impl AutoLayoutCandidateGuess
impl AutoLayoutCandidateGuess
sourcefn new() -> AutoLayoutCandidateGuess
fn new() -> AutoLayoutCandidateGuess
Creates a guess with all elements initialized to zero.
sourcefn from_column_intrinsic_inline_size(
column_intrinsic_inline_size: &ColumnIntrinsicInlineSize,
assignable_inline_size: Au,
) -> AutoLayoutCandidateGuess
fn from_column_intrinsic_inline_size( column_intrinsic_inline_size: &ColumnIntrinsicInlineSize, assignable_inline_size: Au, ) -> AutoLayoutCandidateGuess
Fills in the inline-size guesses for this column per INTRINSIC § 4.3.
sourcefn calculate(&self, selection: SelectedAutoLayoutCandidateGuess) -> Au
fn calculate(&self, selection: SelectedAutoLayoutCandidateGuess) -> Au
Calculates the inline-size, interpolating appropriately based on the value of selection
.
This does not distribute excess inline-size. That must be done later if necessary.
Trait Implementations§
source§impl<'a> Add for &'a AutoLayoutCandidateGuess
impl<'a> Add for &'a AutoLayoutCandidateGuess
§type Output = AutoLayoutCandidateGuess
type Output = AutoLayoutCandidateGuess
The resulting type after applying the
+
operator.source§fn add(self, other: &AutoLayoutCandidateGuess) -> AutoLayoutCandidateGuess
fn add(self, other: &AutoLayoutCandidateGuess) -> AutoLayoutCandidateGuess
Performs the
+
operation. Read moreAuto Trait Implementations§
impl Freeze for AutoLayoutCandidateGuess
impl RefUnwindSafe for AutoLayoutCandidateGuess
impl Send for AutoLayoutCandidateGuess
impl Sync for AutoLayoutCandidateGuess
impl Unpin for AutoLayoutCandidateGuess
impl UnwindSafe for AutoLayoutCandidateGuess
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert