pub struct ComputedLayoutStyle {Show 13 fields
pub display: LayoutDisplay,
pub position: LayoutPosition,
pub float: LayoutFloat,
pub overflow_x: LayoutOverflow,
pub overflow_y: LayoutOverflow,
pub writing_mode: LayoutWritingMode,
pub width: Option<LayoutWidth>,
pub height: Option<LayoutHeight>,
pub min_width: Option<LayoutMinWidth>,
pub min_height: Option<LayoutMinHeight>,
pub max_width: Option<LayoutMaxWidth>,
pub max_height: Option<LayoutMaxHeight>,
pub text_align: StyleTextAlign,
}Expand description
Pre-computed CSS properties needed during layout.
This struct stores resolved CSS values that are frequently accessed during layout calculations. By computing these once during layout tree construction, we avoid O(n * m) style lookups where n = nodes and m = layout passes.
All values are resolved to their final form (no ‘inherit’, ‘initial’, etc.)
Fields§
§display: LayoutDisplayCSS display property
position: LayoutPositionCSS position property
float: LayoutFloatCSS float property
overflow_x: LayoutOverflowCSS overflow-x property
overflow_y: LayoutOverflowCSS overflow-y property
writing_mode: LayoutWritingModeCSS writing-mode property
width: Option<LayoutWidth>CSS width property (None = auto)
height: Option<LayoutHeight>CSS height property (None = auto)
min_width: Option<LayoutMinWidth>CSS min-width property
min_height: Option<LayoutMinHeight>CSS min-height property
max_width: Option<LayoutMaxWidth>CSS max-width property
max_height: Option<LayoutMaxHeight>CSS max-height property
text_align: StyleTextAlignCSS text-align property
Trait Implementations§
Source§impl Clone for ComputedLayoutStyle
impl Clone for ComputedLayoutStyle
Source§fn clone(&self) -> ComputedLayoutStyle
fn clone(&self) -> ComputedLayoutStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputedLayoutStyle
impl Debug for ComputedLayoutStyle
Source§impl Default for ComputedLayoutStyle
impl Default for ComputedLayoutStyle
Source§fn default() -> ComputedLayoutStyle
fn default() -> ComputedLayoutStyle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ComputedLayoutStyle
impl RefUnwindSafe for ComputedLayoutStyle
impl Send for ComputedLayoutStyle
impl Sync for ComputedLayoutStyle
impl Unpin for ComputedLayoutStyle
impl UnsafeUnpin for ComputedLayoutStyle
impl UnwindSafe for ComputedLayoutStyle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more