Struct layout_2020::flexbox::layout::FlexContext
source · struct FlexContext<'a> {
config: FlexContainerConfig,
layout_context: &'a LayoutContext<'a>,
positioning_context: &'a mut PositioningContext,
containing_block: &'a ContainingBlock<'a>,
container_min_cross_size: Au,
container_max_cross_size: Option<Au>,
container_definite_inner_size: FlexRelativeVec2<Option<Au>>,
}
Expand description
Layout parameters and intermediate results about a flex container, grouped to avoid passing around many parameters
Fields§
§config: FlexContainerConfig
§layout_context: &'a LayoutContext<'a>
§positioning_context: &'a mut PositioningContext
§containing_block: &'a ContainingBlock<'a>
§container_min_cross_size: Au
§container_max_cross_size: Option<Au>
§container_definite_inner_size: FlexRelativeVec2<Option<Au>>
Implementations§
source§impl FlexContext<'_>
impl FlexContext<'_>
fn vec2_to_flex_relative<T>(&self, x: LogicalVec2<T>) -> FlexRelativeVec2<T>
fn sides_to_flex_relative<T>(&self, x: LogicalSides<T>) -> FlexRelativeSides<T>
fn sides_to_flow_relative<T>(&self, x: FlexRelativeSides<T>) -> LogicalSides<T>
fn rect_to_flow_relative( &self, base_rect_size: FlexRelativeVec2<Au>, rect: FlexRelativeRect<Au>, ) -> LogicalRect<Au>
Auto Trait Implementations§
impl<'a> Freeze for FlexContext<'a>
impl<'a> !RefUnwindSafe for FlexContext<'a>
impl<'a> Send for FlexContext<'a>
impl<'a> Sync for FlexContext<'a>
impl<'a> Unpin for FlexContext<'a>
impl<'a> !UnwindSafe for FlexContext<'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