Skip to main content

Style

Struct Style 

Source
pub struct Style {
Show 32 fields pub display: Display, pub hidden: bool, pub position: Position, pub direction: TextDirection, pub scroll_x: bool, pub scroll_y: bool, pub inset: Edges, pub width: Length, pub height: Length, pub min_width: Length, pub min_height: Length, pub max_width: Length, pub max_height: Length, pub aspect_ratio: Option<f32>, pub margin: Edges, pub padding: Edges, pub flex_direction: FlexDirection, pub flex_wrap: bool, pub flex_grow: f32, pub flex_shrink: f32, pub flex_basis: Length, pub align_items: Option<Align>, pub align_self: Option<Align>, pub justify_self: Option<Align>, pub align_content: Option<Justify>, pub justify_content: Option<Justify>, pub row_gap: Length, pub column_gap: Length, pub grid_template_columns: Vec<Track>, pub grid_template_rows: Vec<Track>, pub grid_column: GridPlacement, pub grid_row: GridPlacement,
}

Fields§

§display: Display§hidden: bool

Hidden nodes act like display: none but keep their display.

§position: Position§direction: TextDirection§scroll_x: bool

Content may overflow along these axes and is scrolled natively. Set by ScrollView; also lets it shrink below its content size.

§scroll_y: bool§inset: Edges§width: Length§height: Length§min_width: Length§min_height: Length§max_width: Length§max_height: Length§aspect_ratio: Option<f32>§margin: Edges§padding: Edges§flex_direction: FlexDirection§flex_wrap: bool§flex_grow: f32§flex_shrink: f32§flex_basis: Length§align_items: Option<Align>§align_self: Option<Align>§justify_self: Option<Align>

Alignment inside a grid cell along the inline axis.

§align_content: Option<Justify>§justify_content: Option<Justify>§row_gap: Length§column_gap: Length§grid_template_columns: Vec<Track>§grid_template_rows: Vec<Track>§grid_column: GridPlacement§grid_row: GridPlacement

Implementations§

Source§

impl Style

Source

pub fn is_hidden(&self) -> bool

Takes no space and is not shown.

Trait Implementations§

Source§

impl Clone for Style

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 Debug for Style

Source§

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

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

impl Default for Style

Source§

fn default() -> Style

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Style

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 Style

Auto Trait Implementations§

§

impl Freeze for Style

§

impl RefUnwindSafe for Style

§

impl Send for Style

§

impl Sync for Style

§

impl Unpin for Style

§

impl UnsafeUnpin for Style

§

impl UnwindSafe for Style

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.