struct InitialFlexLineLayout<'a> {
items: Vec<FlexLineItem<'a>>,
line_size: FlexRelativeVec2<Au>,
free_space_in_main_axis: Au,
}Expand description
The result of splitting the flex items into lines using their intrinsic sizes and doing an initial layout of each item. A final layout still needs to happen after this is produced to handle stretching.
Fields§
§items: Vec<FlexLineItem<'a>>The items that are placed in this line.
line_size: FlexRelativeVec2<Au>The initial size of this flex line, not taking into account align-content: stretch.
free_space_in_main_axis: AuThe free space available to this line after the initial layout.
Implementations§
Source§impl InitialFlexLineLayout<'_>
impl InitialFlexLineLayout<'_>
fn new<'items>( flex_context: &FlexContext<'_>, items: Vec<FlexItem<'items>>, outer_hypothetical_main_sizes_sum: Au, container_main_size: Au, main_gap: Au, ) -> InitialFlexLineLayout<'items>
Sourcefn resolve_flexible_lengths<'items>(
items: &'items [FlexItem<'items>],
outer_hypothetical_main_sizes_sum: Au,
container_main_size: Au,
) -> (Vec<Au>, Au)
fn resolve_flexible_lengths<'items>( items: &'items [FlexItem<'items>], outer_hypothetical_main_sizes_sum: Au, container_main_size: Au, ) -> (Vec<Au>, Au)
Return the main size of each item, and the line’s remainaing free space https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
Sourcefn cross_size<'items>(
items: &'items [FlexLineItem<'items>],
flex_context: &FlexContext<'_>,
) -> Au
fn cross_size<'items>( items: &'items [FlexLineItem<'items>], flex_context: &FlexContext<'_>, ) -> Au
fn finish_with_final_cross_size( self, flex_context: &mut FlexContext<'_>, main_gap: Au, final_line_cross_size: Au, ) -> FinalFlexLineLayout
Auto Trait Implementations§
impl<'a> Freeze for InitialFlexLineLayout<'a>
impl<'a> !RefUnwindSafe for InitialFlexLineLayout<'a>
impl<'a> Send for InitialFlexLineLayout<'a>
impl<'a> Sync for InitialFlexLineLayout<'a>
impl<'a> Unpin for InitialFlexLineLayout<'a>
impl<'a> UnsafeUnpin for InitialFlexLineLayout<'a>
impl<'a> !UnwindSafe for InitialFlexLineLayout<'a>
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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