Struct layout_2020::ConstraintSpace
source · pub(crate) struct ConstraintSpace {
pub block_size: SizeConstraint,
pub writing_mode: WritingMode,
pub preferred_aspect_ratio: Option<AspectRatio>,
}
Expand description
Represents the set of constraints that we use when computing the min-content and max-content inline sizes of an element.
Fields§
§block_size: SizeConstraint
§writing_mode: WritingMode
§preferred_aspect_ratio: Option<AspectRatio>
Implementations§
source§impl ConstraintSpace
impl ConstraintSpace
pub(crate) fn new( block_size: SizeConstraint, writing_mode: WritingMode, preferred_aspect_ratio: Option<AspectRatio>, ) -> Self
pub(crate) fn new_for_style_and_ratio( style: &ComputedValues, preferred_aspect_ratio: Option<AspectRatio>, ) -> Self
Trait Implementations§
source§impl From<&ConstraintSpace> for IndefiniteContainingBlock
impl From<&ConstraintSpace> for IndefiniteContainingBlock
source§fn from(constraint_space: &ConstraintSpace) -> Self
fn from(constraint_space: &ConstraintSpace) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConstraintSpace
impl RefUnwindSafe for ConstraintSpace
impl Send for ConstraintSpace
impl Sync for ConstraintSpace
impl Unpin for ConstraintSpace
impl UnwindSafe for ConstraintSpace
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