pub struct LayoutStyle {Show 20 fields
pub width: Length,
pub height: Length,
pub padding: Edges,
pub margin: Edges,
pub min_width: f32,
pub max_width: f32,
pub min_height: f32,
pub max_height: f32,
pub flex: f32,
pub flex_shrink: f32,
pub flex_basis: Option<Length>,
pub align_self: Option<Align>,
pub aspect_ratio: Option<f32>,
pub indent_top: Option<f32>,
pub indent_bottom: Option<f32>,
pub indent_left: Option<f32>,
pub indent_right: Option<f32>,
pub position: Position,
pub overflow: Overflow,
pub hit_testable: bool,
}Fields§
§width: Length§height: Length§padding: Edges§margin: Edges§min_width: f32§max_width: f32§min_height: f32§max_height: f32§flex: f32§flex_shrink: f32§flex_basis: Option<Length>§align_self: Option<Align>§aspect_ratio: Option<f32>§indent_top: Option<f32>§indent_bottom: Option<f32>§indent_left: Option<f32>§indent_right: Option<f32>§position: Position§overflow: Overflow§hit_testable: boolImplementations§
Source§impl LayoutStyle
impl LayoutStyle
pub fn width(self, width: Length) -> Self
pub fn height(self, height: Length) -> Self
pub fn fit(self) -> Self
pub fn hit_testable(self, on: bool) -> Self
pub fn padding(self, padding: impl Into<Edges>) -> Self
pub fn pad(self, padding: impl Into<Edges>) -> Self
pub fn padding_xy(self, x: f32, y: f32) -> Self
pub fn padding_x(self, x: f32) -> Self
pub fn padding_y(self, y: f32) -> Self
pub fn padding_left(self, v: f32) -> Self
pub fn padding_right(self, v: f32) -> Self
pub fn padding_top(self, v: f32) -> Self
pub fn padding_bottom(self, v: f32) -> Self
pub fn min_width(self, v: f32) -> Self
pub fn max_width(self, v: f32) -> Self
pub fn min_height(self, v: f32) -> Self
pub fn max_height(self, v: f32) -> Self
pub fn clamp_width(self, w: f32) -> f32
pub fn clamp_height(self, h: f32) -> f32
pub fn clamp_size(self, size: Size) -> Size
pub fn margin(self, margin: impl Into<Edges>) -> Self
pub fn margin_xy(self, x: f32, y: f32) -> Self
pub fn margin_x(self, x: f32) -> Self
pub fn margin_y(self, y: f32) -> Self
pub fn margin_left(self, v: f32) -> Self
pub fn margin_right(self, v: f32) -> Self
pub fn margin_top(self, v: f32) -> Self
pub fn margin_bottom(self, v: f32) -> Self
pub fn flex(self, weight: f32) -> Self
pub fn flex_grow(self, weight: f32) -> Self
pub fn flex_shrink(self, shrink: f32) -> Self
pub fn flex_full(self, grow: f32, shrink: f32, basis: Option<Length>) -> Self
pub fn flex_basis(self, basis: Option<Length>) -> Self
pub fn no_basis(self) -> Self
pub fn expand(self) -> Self
pub fn flex_weight(self) -> f32
pub fn flex_grow_weight(self) -> f32
pub fn flex_shrink_weight(self) -> f32
pub fn align_self(self, align: Option<Align>) -> Self
pub fn align_self_value(self, align: Align) -> Self
pub fn auto_align(self) -> Self
pub fn effective_align(self, container: Align) -> Align
pub fn aspect_ratio(self, ratio: Option<f32>) -> Self
pub fn aspect(self, ratio: f32) -> Self
pub fn no_aspect(self) -> Self
pub fn position(self, position: Position) -> Self
pub fn absolute(self) -> Self
pub fn absolute_at(self, left: f32, top: f32) -> Self
pub fn absolute_inset(self, inset: Inset) -> Self
pub fn is_absolute(self) -> bool
pub fn absolute_inset_of(self) -> Option<Inset>
pub fn margin_main(self, axis: Axis) -> f32
pub fn margin_cross(self, axis: Axis) -> f32
pub fn apply_aspect( self, w: f32, h: f32, w_auto: bool, h_auto: bool, ) -> (f32, f32)
pub fn outer_size(self, inner: Size) -> Size
pub fn min_main(self, axis: Axis) -> f32
pub fn max_main(self, axis: Axis) -> f32
pub fn clamp_main(self, value: f32, axis: Axis) -> f32
pub fn overflow(self, overflow: Overflow) -> Self
pub fn indent_top(self, v: f32) -> Self
pub fn indent_bottom(self, v: f32) -> Self
pub fn indent_left(self, v: f32) -> Self
pub fn indent_right(self, v: f32) -> Self
pub fn clear_indent_top(self) -> Self
pub fn clear_indent_bottom(self) -> Self
pub fn clear_indent_left(self) -> Self
pub fn clear_indent_right(self) -> Self
pub fn clear_indents(self) -> Self
pub fn indent(self, indents: Indents) -> Self
pub fn indent_all(self, v: f32) -> Self
pub fn indent_xy(self, x: f32, y: f32) -> Self
pub fn indent_axes(self, horizontal: f32, vertical: f32) -> Self
pub fn indent_main_start(self, axis: Axis) -> Option<f32>
pub fn indent_main_end(self, axis: Axis) -> Option<f32>
pub fn indent_cross_start(self, axis: Axis) -> Option<f32>
pub fn indent_cross_end(self, axis: Axis) -> Option<f32>
pub fn indents(self) -> Indents
Trait Implementations§
Source§impl Clone for LayoutStyle
impl Clone for LayoutStyle
impl Copy for LayoutStyle
Source§impl Debug for LayoutStyle
impl Debug for LayoutStyle
Source§impl Default for LayoutStyle
impl Default for LayoutStyle
Source§impl PartialEq for LayoutStyle
impl PartialEq for LayoutStyle
impl StructuralPartialEq for LayoutStyle
Auto Trait Implementations§
impl Freeze for LayoutStyle
impl RefUnwindSafe for LayoutStyle
impl Send for LayoutStyle
impl Sync for LayoutStyle
impl Unpin for LayoutStyle
impl UnsafeUnpin for LayoutStyle
impl UnwindSafe for LayoutStyle
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