pub struct Switch { /* private fields */ }Expand description
An on/off switch.
Implementations§
Source§impl Switch
impl Switch
pub fn new() -> Self
pub fn name(self, v: impl Into<String>) -> Self
pub fn checked(self, v: bool) -> Self
pub fn disabled(self, v: bool) -> Self
pub fn required(self, v: bool) -> Self
pub fn color(self, v: Color) -> Self
pub fn size(self, v: Size) -> Self
pub fn radius(self, v: Radius) -> Self
Sourcepub fn description(self, v: impl MaybeText) -> Self
pub fn description(self, v: impl MaybeText) -> Self
Secondary text under the label.
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
pub fn unstyled(self, v: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Switch
impl !Sync for Switch
impl !UnwindSafe for Switch
impl Forget for Switch
impl Freeze for Switch
impl Move for Switch
impl Send for Switch
impl Unpin for Switch
impl UnsafeUnpin for Switch
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