pub enum ButtonRole {
Destructive,
Cancel,
Confirm,
Close,
}Expand description
SwiftUI.ButtonRole — what a button is, not how it looks.
The style system reads it: a destructive button is red wherever red means destructive, and a cancel button is the one a sheet’s dismiss gesture triggers. Setting a colour by hand gets the first and none of the rest.
Variants§
Trait Implementations§
Source§impl Clone for ButtonRole
impl Clone for ButtonRole
impl Copy for ButtonRole
Source§impl Debug for ButtonRole
impl Debug for ButtonRole
impl Eq for ButtonRole
Source§impl From<Cancel> for ButtonRole
impl From<Cancel> for ButtonRole
Source§impl From<Close> for ButtonRole
impl From<Close> for ButtonRole
Source§impl From<Confirm> for ButtonRole
impl From<Confirm> for ButtonRole
Source§impl From<Destructive> for ButtonRole
impl From<Destructive> for ButtonRole
Source§fn from(_: Destructive) -> Self
fn from(_: Destructive) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ButtonRole
impl PartialEq for ButtonRole
impl StructuralPartialEq for ButtonRole
Auto Trait Implementations§
impl Freeze for ButtonRole
impl RefUnwindSafe for ButtonRole
impl Send for ButtonRole
impl Sync for ButtonRole
impl Unpin for ButtonRole
impl UnsafeUnpin for ButtonRole
impl UnwindSafe for ButtonRole
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