#[repr(C)]pub struct StackStyle {
pub axis: Axis,
pub spacing: f32,
pub padding: f32,
pub align: Align,
pub justify: Justify,
pub surface: Surface,
pub grow: bool,
pub width: f32,
pub max_width: f32,
}Expand description
repr(C) because compiled apps store it as is.
Fields§
§axis: Axis§spacing: f32§padding: f32§align: Align§justify: Justify§surface: Surface§grow: boolWhether the stack takes the space its parent has left along the parent’s axis.
width: f32A fixed width in points, or StackStyle::FIT to fit the content.
max_width: f32The widest the stack may get in points, or StackStyle::FIT for no limit. A
stack with a limit fills the width it is given, up to the limit.
Implementations§
Source§impl StackStyle
impl StackStyle
Sourcepub const FIT: f32 = 0.0
pub const FIT: f32 = 0.0
A width or max_width that sets no size; compiled apps store sizes as plain
numbers, so this stands in for “none”.
pub const fn new(axis: Axis) -> Self
Sourcepub fn fixed_width(&self) -> Option<f32>
pub fn fixed_width(&self) -> Option<f32>
The fixed width, if the stack has one.
Sourcepub fn width_limit(&self) -> Option<f32>
pub fn width_limit(&self) -> Option<f32>
The width limit, if the stack has one.
Trait Implementations§
Source§impl Clone for StackStyle
impl Clone for StackStyle
Source§fn clone(&self) -> StackStyle
fn clone(&self) -> StackStyle
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 moreimpl Copy for StackStyle
Source§impl Debug for StackStyle
impl Debug for StackStyle
Source§impl PartialEq for StackStyle
impl PartialEq for StackStyle
impl StructuralPartialEq for StackStyle
Auto Trait Implementations§
impl Freeze for StackStyle
impl RefUnwindSafe for StackStyle
impl Send for StackStyle
impl Sync for StackStyle
impl Unpin for StackStyle
impl UnsafeUnpin for StackStyle
impl UnwindSafe for StackStyle
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