Struct layout_2013::flex::FlexLine
source · struct FlexLine {
pub range: Range<usize>,
pub free_space: Au,
pub auto_margin_count: i32,
pub cross_size: Au,
}
Expand description
A line in a flex container.
Fields§
§range: Range<usize>
Range of items belong to this line in ‘self.items’.
free_space: Au
Remaining free space of this line, items will grow or shrink based on it being positive or negative.
auto_margin_count: i32
The number of auto margins of items.
cross_size: Au
Line size in the block direction.
Implementations§
source§impl FlexLine
impl FlexLine
pub fn new( range: Range<usize>, free_space: Au, auto_margin_count: i32, ) -> FlexLine
sourcepub fn flex_resolve(&mut self, items: &mut [FlexItem], collapse: bool)
pub fn flex_resolve(&mut self, items: &mut [FlexItem], collapse: bool)
This method implements the flexible lengths resolving algorithm. The ‘collapse’ parameter is used to indicate whether items with ‘visibility: collapse’ is included in length resolving. The result main size is stored in ‘item.main_size’. https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlexLine
impl RefUnwindSafe for FlexLine
impl Send for FlexLine
impl Sync for FlexLine
impl Unpin for FlexLine
impl UnwindSafe for FlexLine
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