pub struct Checkbox { /* private fields */ }Expand description
A check box with a label.
Implementations§
Source§impl Checkbox
impl Checkbox
Sourcepub fn new(label: impl Into<String>, value: Binding<bool>) -> Self
pub fn new(label: impl Into<String>, value: Binding<bool>) -> Self
A check box bound to value, with this label.
Sourcepub fn leading(self, width: f32) -> Self
pub fn leading(self, width: f32) -> Self
Reserves this width for the box, so labels line up in a column. A list
that mixes check boxes with Toggles passes the toggle’s width, 40.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Checkbox
impl !Send for Checkbox
impl !Sync for Checkbox
impl !UnwindSafe for Checkbox
impl Freeze for Checkbox
impl Unpin for Checkbox
impl UnsafeUnpin for Checkbox
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.