Struct layout_2020::flexbox::layout::InitialFlexLineLayout
source · 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: Au
The 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> !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> 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