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) -> LayoutStyle
pub fn height(self, height: Length) -> LayoutStyle
pub fn fit(self) -> LayoutStyle
pub fn hit_testable(self, on: bool) -> LayoutStyle
pub fn padding(self, padding: impl Into<Edges>) -> LayoutStyle
pub fn pad(self, padding: impl Into<Edges>) -> LayoutStyle
pub fn padding_xy(self, x: f32, y: f32) -> LayoutStyle
pub fn padding_x(self, x: f32) -> LayoutStyle
pub fn padding_y(self, y: f32) -> LayoutStyle
pub fn padding_left(self, v: f32) -> LayoutStyle
pub fn padding_right(self, v: f32) -> LayoutStyle
pub fn padding_top(self, v: f32) -> LayoutStyle
pub fn padding_bottom(self, v: f32) -> LayoutStyle
pub fn min_width(self, v: f32) -> LayoutStyle
pub fn max_width(self, v: f32) -> LayoutStyle
pub fn min_height(self, v: f32) -> LayoutStyle
pub fn max_height(self, v: f32) -> LayoutStyle
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>) -> LayoutStyle
pub fn margin_xy(self, x: f32, y: f32) -> LayoutStyle
pub fn margin_x(self, x: f32) -> LayoutStyle
pub fn margin_y(self, y: f32) -> LayoutStyle
pub fn margin_left(self, v: f32) -> LayoutStyle
pub fn margin_right(self, v: f32) -> LayoutStyle
pub fn margin_top(self, v: f32) -> LayoutStyle
pub fn margin_bottom(self, v: f32) -> LayoutStyle
pub fn flex(self, weight: f32) -> LayoutStyle
pub fn flex_grow(self, weight: f32) -> LayoutStyle
pub fn flex_shrink(self, shrink: f32) -> LayoutStyle
pub fn flex_full( self, grow: f32, shrink: f32, basis: Option<Length>, ) -> LayoutStyle
pub fn flex_basis(self, basis: Option<Length>) -> LayoutStyle
pub fn no_basis(self) -> LayoutStyle
pub fn expand(self) -> LayoutStyle
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>) -> LayoutStyle
pub fn align_self_value(self, align: Align) -> LayoutStyle
pub fn auto_align(self) -> LayoutStyle
pub fn effective_align(self, container: Align) -> Align
pub fn aspect_ratio(self, ratio: Option<f32>) -> LayoutStyle
pub fn aspect(self, ratio: f32) -> LayoutStyle
pub fn no_aspect(self) -> LayoutStyle
pub fn position(self, position: Position) -> LayoutStyle
pub fn absolute(self) -> LayoutStyle
pub fn absolute_at(self, left: f32, top: f32) -> LayoutStyle
pub fn absolute_inset(self, inset: Inset) -> LayoutStyle
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) -> LayoutStyle
pub fn indent_top(self, v: f32) -> LayoutStyle
pub fn indent_bottom(self, v: f32) -> LayoutStyle
pub fn indent_left(self, v: f32) -> LayoutStyle
pub fn indent_right(self, v: f32) -> LayoutStyle
pub fn clear_indent_top(self) -> LayoutStyle
pub fn clear_indent_bottom(self) -> LayoutStyle
pub fn clear_indent_left(self) -> LayoutStyle
pub fn clear_indent_right(self) -> LayoutStyle
pub fn clear_indents(self) -> LayoutStyle
pub fn indent(self, indents: Indents) -> LayoutStyle
pub fn indent_all(self, v: f32) -> LayoutStyle
pub fn indent_xy(self, x: f32, y: f32) -> LayoutStyle
pub fn indent_axes(self, horizontal: f32, vertical: f32) -> LayoutStyle
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
Source§fn clone(&self) -> LayoutStyle
fn clone(&self) -> LayoutStyle
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 LayoutStyle
Source§impl Debug for LayoutStyle
impl Debug for LayoutStyle
Source§impl Default for LayoutStyle
impl Default for LayoutStyle
Source§fn default() -> LayoutStyle
fn default() -> LayoutStyle
Returns the “default value” for a type. Read more
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