Skip to main content

LayoutStyle

Struct LayoutStyle 

Source
pub struct LayoutStyle { /* private fields */ }
Expand description

Layout-affecting properties separated from paint properties for surgical dirty-flag tracking.

Implementations§

Source§

impl LayoutStyle

Non-panicking optional offset readers for LayoutStyle.

Source

pub fn top_offset(&self) -> Option<f32>

Returns the optional top offset.

§Arguments
  • &Self - Layout style.
§Returns
  • Option<f32> - Top offset if specified.
Source

pub fn right_offset(&self) -> Option<f32>

Returns the optional right offset.

§Arguments
  • &Self - Layout style.
§Returns
  • Option<f32> - Right offset if specified.
Source

pub fn bottom_offset(&self) -> Option<f32>

Returns the optional bottom offset.

§Arguments
  • &Self - Layout style.
§Returns
  • Option<f32> - Bottom offset if specified.
Source

pub fn left_offset(&self) -> Option<f32>

Returns the optional left offset.

§Arguments
  • &Self - Layout style.
§Returns
  • Option<f32> - Left offset if specified.
Source

pub fn aspect_ratio_value(&self) -> Option<f32>

Returns the optional aspect ratio (width / height).

§Arguments
  • &Self - Layout style.
§Returns
  • Option<f32> - Aspect ratio if specified.
Source§

impl LayoutStyle

Source

pub fn get_display(&self) -> Display

Source

pub fn get_mut_display(&mut self) -> &mut Display

Source

pub fn set_display(&mut self, val: Display) -> &mut Self

Source

pub fn get_position(&self) -> Position

Source

pub fn get_mut_position(&mut self) -> &mut Position

Source

pub fn set_position(&mut self, val: Position) -> &mut Self

Source

pub fn get_flex_direction(&self) -> FlexDirection

Source

pub fn get_mut_flex_direction(&mut self) -> &mut FlexDirection

Source

pub fn set_flex_direction(&mut self, val: FlexDirection) -> &mut Self

Source

pub fn get_flex_wrap(&self) -> FlexWrap

Source

pub fn get_mut_flex_wrap(&mut self) -> &mut FlexWrap

Source

pub fn set_flex_wrap(&mut self, val: FlexWrap) -> &mut Self

Source

pub fn get_justify_content(&self) -> JustifyContent

Source

pub fn get_mut_justify_content(&mut self) -> &mut JustifyContent

Source

pub fn set_justify_content(&mut self, val: JustifyContent) -> &mut Self

Source

pub fn get_align_items(&self) -> AlignItems

Source

pub fn get_mut_align_items(&mut self) -> &mut AlignItems

Source

pub fn set_align_items(&mut self, val: AlignItems) -> &mut Self

Source

pub fn get_align_self(&self) -> AlignSelf

Source

pub fn get_mut_align_self(&mut self) -> &mut AlignSelf

Source

pub fn set_align_self(&mut self, val: AlignSelf) -> &mut Self

Source

pub fn get_overflow(&self) -> Overflow

Source

pub fn get_mut_overflow(&mut self) -> &mut Overflow

Source

pub fn set_overflow(&mut self, val: Overflow) -> &mut Self

Source

pub fn get_flex_grow(&self) -> f32

Source

pub fn get_mut_flex_grow(&mut self) -> &mut f32

Source

pub fn set_flex_grow(&mut self, val: f32) -> &mut Self

Source

pub fn get_flex_shrink(&self) -> f32

Source

pub fn get_mut_flex_shrink(&mut self) -> &mut f32

Source

pub fn set_flex_shrink(&mut self, val: f32) -> &mut Self

Source

pub fn get_flex_basis(&self) -> Length

Source

pub fn get_mut_flex_basis(&mut self) -> &mut Length

Source

pub fn set_flex_basis(&mut self, val: Length) -> &mut Self

Source

pub fn get_grid_columns(&self) -> u16

Source

pub fn get_mut_grid_columns(&mut self) -> &mut u16

Source

pub fn set_grid_columns(&mut self, val: u16) -> &mut Self

Source

pub fn get_width(&self) -> Length

Source

pub fn get_mut_width(&mut self) -> &mut Length

Source

pub fn set_width(&mut self, val: Length) -> &mut Self

Source

pub fn get_height(&self) -> Length

Source

pub fn get_mut_height(&mut self) -> &mut Length

Source

pub fn set_height(&mut self, val: Length) -> &mut Self

Source

pub fn get_min_width(&self) -> Length

Source

pub fn get_mut_min_width(&mut self) -> &mut Length

Source

pub fn set_min_width(&mut self, val: Length) -> &mut Self

Source

pub fn get_min_height(&self) -> Length

Source

pub fn get_mut_min_height(&mut self) -> &mut Length

Source

pub fn set_min_height(&mut self, val: Length) -> &mut Self

Source

pub fn get_max_width(&self) -> Length

Source

pub fn get_mut_max_width(&mut self) -> &mut Length

Source

pub fn set_max_width(&mut self, val: Length) -> &mut Self

Source

pub fn get_max_height(&self) -> Length

Source

pub fn get_mut_max_height(&mut self) -> &mut Length

Source

pub fn set_max_height(&mut self, val: Length) -> &mut Self

Source

pub fn get_margin(&self) -> Edges

Source

pub fn get_mut_margin(&mut self) -> &mut Edges

Source

pub fn set_margin(&mut self, val: Edges) -> &mut Self

Source

pub fn get_padding(&self) -> Edges

Source

pub fn get_mut_padding(&mut self) -> &mut Edges

Source

pub fn set_padding(&mut self, val: Edges) -> &mut Self

Source

pub fn get_row_gap(&self) -> f32

Source

pub fn get_mut_row_gap(&mut self) -> &mut f32

Source

pub fn set_row_gap(&mut self, val: f32) -> &mut Self

Source

pub fn get_column_gap(&self) -> f32

Source

pub fn get_mut_column_gap(&mut self) -> &mut f32

Source

pub fn set_column_gap(&mut self, val: f32) -> &mut Self

Source

pub fn get_mut_top(&mut self) -> &mut Option<f32>

Source

pub fn set_top(&mut self, val: Option<f32>) -> &mut Self

Source

pub fn get_mut_right(&mut self) -> &mut Option<f32>

Source

pub fn set_right(&mut self, val: Option<f32>) -> &mut Self

Source

pub fn get_mut_bottom(&mut self) -> &mut Option<f32>

Source

pub fn set_bottom(&mut self, val: Option<f32>) -> &mut Self

Source

pub fn get_mut_left(&mut self) -> &mut Option<f32>

Source

pub fn set_left(&mut self, val: Option<f32>) -> &mut Self

Source

pub fn get_z_index(&self) -> i32

Source

pub fn get_mut_z_index(&mut self) -> &mut i32

Source

pub fn set_z_index(&mut self, val: i32) -> &mut Self

Source

pub fn get_mut_aspect_ratio(&mut self) -> &mut Option<f32>

Source

pub fn set_aspect_ratio(&mut self, val: Option<f32>) -> &mut Self

Trait Implementations§

Source§

impl Clone for LayoutStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for LayoutStyle

Source§

impl Debug for LayoutStyle

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for LayoutStyle

Default layout style matching standard Flexbox defaults.

Source§

fn default() -> Self

Creates default layout properties (Flex, Row, flex_shrink: 1.0).

§Returns
  • Self - Default LayoutStyle.
Source§

impl PartialEq for LayoutStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LayoutStyle

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.