pub struct StyleProps {Show 14 fields
pub width: Option<Dimension>,
pub height: Option<Dimension>,
pub padding: Option<Edges<f32>>,
pub margin: Option<Edges<f32>>,
pub gap: Option<f32>,
pub flex_grow: Option<f32>,
pub flex_shrink: Option<f32>,
pub align_items: Option<Align>,
pub justify_content: Option<Justify>,
pub overflow: Overflow,
pub z_index: i32,
pub align_self: Option<Align>,
pub focusable: bool,
pub cursor: Cursor,
}Expand description
Low-level layout and interaction fields for a node.
App code usually sets these through builder methods (Column::gap, etc.)
rather than constructing StyleProps directly.
Fields§
§width: Option<Dimension>§height: Option<Dimension>§padding: Option<Edges<f32>>§margin: Option<Edges<f32>>§gap: Option<f32>§flex_grow: Option<f32>§flex_shrink: Option<f32>§align_items: Option<Align>§justify_content: Option<Justify>§overflow: Overflow§z_index: i32Paint-only z-order for this node among siblings (0 = normal flow).
Layout is unaffected. During painting, z_index == 0 nodes are painted first in normal
traversal order; non-zero nodes are deferred and then painted in ascending z_index order.
align_self: Option<Align>Cross-axis alignment when this node is a flex child (e.g. avoid stretch in a column).
focusable: bool§cursor: CursorImplementations§
Source§impl StyleProps
impl StyleProps
pub fn to_taffy_style(&self) -> Style
Trait Implementations§
Source§impl Clone for StyleProps
impl Clone for StyleProps
Source§fn clone(&self) -> StyleProps
fn clone(&self) -> StyleProps
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StyleProps
impl Debug for StyleProps
Source§impl Default for StyleProps
impl Default for StyleProps
Source§fn default() -> StyleProps
fn default() -> StyleProps
Returns the “default value” for a type. Read more
Source§impl PartialEq for StyleProps
impl PartialEq for StyleProps
Source§fn eq(&self, other: &StyleProps) -> bool
fn eq(&self, other: &StyleProps) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StyleProps
Auto Trait Implementations§
impl Freeze for StyleProps
impl RefUnwindSafe for StyleProps
impl Send for StyleProps
impl Sync for StyleProps
impl Unpin for StyleProps
impl UnsafeUnpin for StyleProps
impl UnwindSafe for StyleProps
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.