pub struct Modifier {Show 27 fields
pub padding: Option<f32>,
pub size: Option<Size>,
pub fill_max: bool,
pub background: Option<Color>,
pub border: Option<Border>,
pub flex_grow: Option<f32>,
pub flex_shrink: Option<f32>,
pub flex_basis: Option<f32>,
pub align_self: Option<AlignSelf>,
pub aspect_ratio: Option<f32>,
pub position_type: Option<PositionType>,
pub offset_left: Option<f32>,
pub offset_right: Option<f32>,
pub offset_top: Option<f32>,
pub offset_bottom: Option<f32>,
pub grid: Option<GridConfig>,
pub grid_col_span: Option<u16>,
pub grid_row_span: Option<u16>,
pub click: bool,
pub semantics_label: Option<String>,
pub z_index: f32,
pub clip_rounded: Option<f32>,
pub on_pointer_down: Option<Rc<dyn Fn(PointerEvent)>>,
pub on_pointer_move: Option<Rc<dyn Fn(PointerEvent)>>,
pub on_pointer_up: Option<Rc<dyn Fn(PointerEvent)>>,
pub on_pointer_enter: Option<Rc<dyn Fn(PointerEvent)>>,
pub on_pointer_leave: Option<Rc<dyn Fn(PointerEvent)>>,
}Fields§
§padding: Option<f32>§size: Option<Size>§fill_max: bool§background: Option<Color>§border: Option<Border>§flex_grow: Option<f32>§flex_shrink: Option<f32>§flex_basis: Option<f32>§align_self: Option<AlignSelf>§aspect_ratio: Option<f32>§position_type: Option<PositionType>§offset_left: Option<f32>§offset_right: Option<f32>§offset_top: Option<f32>§offset_bottom: Option<f32>§grid: Option<GridConfig>§grid_col_span: Option<u16>§grid_row_span: Option<u16>§click: bool§semantics_label: Option<String>§z_index: f32§clip_rounded: Option<f32>§on_pointer_down: Option<Rc<dyn Fn(PointerEvent)>>§on_pointer_move: Option<Rc<dyn Fn(PointerEvent)>>§on_pointer_up: Option<Rc<dyn Fn(PointerEvent)>>§on_pointer_enter: Option<Rc<dyn Fn(PointerEvent)>>§on_pointer_leave: Option<Rc<dyn Fn(PointerEvent)>>Implementations§
Source§impl Modifier
impl Modifier
pub fn new() -> Self
pub fn padding(self, px: f32) -> Self
pub fn size(self, w: f32, h: f32) -> Self
pub fn fill_max_size(self) -> Self
pub fn background(self, color: Color) -> Self
pub fn border(self, width: f32, color: Color, radius: f32) -> Self
pub fn clickable(self) -> Self
pub fn semantics(self, label: impl Into<String>) -> Self
pub fn z_index(self, z: f32) -> Self
pub fn clip_rounded(self, r: f32) -> Self
pub fn on_pointer_down(self, f: impl Fn(PointerEvent) + 'static) -> Self
pub fn on_pointer_move(self, f: impl Fn(PointerEvent) + 'static) -> Self
pub fn on_pointer_up(self, f: impl Fn(PointerEvent) + 'static) -> Self
pub fn on_pointer_enter(self, f: impl Fn(PointerEvent) + 'static) -> Self
pub fn on_pointer_leave(self, f: impl Fn(PointerEvent) + 'static) -> Self
pub fn flex_grow(self, g: f32) -> Self
pub fn flex_shrink(self, s: f32) -> Self
pub fn flex_basis(self, px: f32) -> Self
pub fn align_self_baseline(self) -> Self
pub fn align_self_center(self) -> Self
pub fn aspect_ratio(self, ratio: f32) -> Self
pub fn absolute(self) -> Self
pub fn offset( self, left: Option<f32>, top: Option<f32>, right: Option<f32>, bottom: Option<f32>, ) -> Self
pub fn grid(self, columns: usize, row_gap: f32, column_gap: f32) -> Self
pub fn grid_span(self, col_span: u16, row_span: u16) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Modifier
impl !RefUnwindSafe for Modifier
impl !Send for Modifier
impl !Sync for Modifier
impl Unpin for Modifier
impl !UnwindSafe for Modifier
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