Skip to main content

ResolvedStyle

Struct ResolvedStyle 

Source
pub struct ResolvedStyle {
Show 56 fields pub width: SizeConstraint, pub height: SizeConstraint, pub min_width: f64, pub min_height: f64, pub max_width: f64, pub max_height: f64, pub padding: Edges, pub margin: MarginEdges, pub display: Display, pub flex_direction: FlexDirection, pub justify_content: JustifyContent, pub align_items: AlignItems, pub align_self: Option<AlignItems>, pub flex_wrap: FlexWrap, pub align_content: AlignContent, pub flex_grow: f64, pub flex_shrink: f64, pub flex_basis: SizeConstraint, pub gap: f64, pub row_gap: f64, pub column_gap: f64, pub grid_template_columns: Option<Vec<GridTrackSize>>, pub grid_template_rows: Option<Vec<GridTrackSize>>, pub grid_auto_rows: Option<GridTrackSize>, pub grid_auto_columns: Option<GridTrackSize>, pub grid_placement: Option<GridPlacement>, pub font_family: String, pub font_size: f64, pub font_weight: u32, pub font_style: FontStyle, pub line_height: f64, pub text_align: TextAlign, pub letter_spacing: f64, pub text_decoration: TextDecoration, pub text_transform: TextTransform, pub hyphens: Hyphens, pub lang: Option<String>, pub direction: Direction, pub text_overflow: TextOverflow, pub line_breaking: LineBreaking, pub color: Color, pub background_color: Option<Color>, pub opacity: f64, pub overflow: Overflow, pub border_width: Edges, pub border_color: EdgeValues<Color>, pub border_radius: CornerValues, pub position: Position, pub top: Option<f64>, pub right: Option<f64>, pub bottom: Option<f64>, pub left: Option<f64>, pub breakable: bool, pub break_before: bool, pub min_widow_lines: u32, pub min_orphan_lines: u32,
}
Expand description

Resolved style: all values are concrete (no Option, no Auto for computed values). This is what the layout engine works with after style resolution.

Fields§

§width: SizeConstraint§height: SizeConstraint§min_width: f64§min_height: f64§max_width: f64§max_height: f64§padding: Edges§margin: MarginEdges§display: Display§flex_direction: FlexDirection§justify_content: JustifyContent§align_items: AlignItems§align_self: Option<AlignItems>§flex_wrap: FlexWrap§align_content: AlignContent§flex_grow: f64§flex_shrink: f64§flex_basis: SizeConstraint§gap: f64§row_gap: f64§column_gap: f64§grid_template_columns: Option<Vec<GridTrackSize>>§grid_template_rows: Option<Vec<GridTrackSize>>§grid_auto_rows: Option<GridTrackSize>§grid_auto_columns: Option<GridTrackSize>§grid_placement: Option<GridPlacement>§font_family: String§font_size: f64§font_weight: u32§font_style: FontStyle§line_height: f64§text_align: TextAlign§letter_spacing: f64§text_decoration: TextDecoration§text_transform: TextTransform§hyphens: Hyphens§lang: Option<String>§direction: Direction§text_overflow: TextOverflow§line_breaking: LineBreaking§color: Color§background_color: Option<Color>§opacity: f64§overflow: Overflow§border_width: Edges§border_color: EdgeValues<Color>§border_radius: CornerValues§position: Position§top: Option<f64>§right: Option<f64>§bottom: Option<f64>§left: Option<f64>§breakable: bool§break_before: bool§min_widow_lines: u32§min_orphan_lines: u32

Trait Implementations§

Source§

impl Clone for ResolvedStyle

Source§

fn clone(&self) -> ResolvedStyle

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V