pub enum ButtonRole {
Normal,
Default,
Cancel,
Destructive,
}Expand description
What a button does in its window or dialog, which each platform shows and handles its own way. Platforms without an equivalent ignore it.
Variants§
Normal
An ordinary button.
Default
The action Return confirms: the default button on AppKit (Return clicks it), the suggested action on GTK, the default button on Qt, the accent button on WinUI. One per window or dialog.
Cancel
The action Escape takes: the cancel button on AppKit (Escape clicks it). The others show it as a normal button.
Destructive
An action that destroys data: GTK’s destructive action; AppKit marks it so the system can warn. Qt and WinUI have no such style.
Trait Implementations§
Source§impl Clone for ButtonRole
impl Clone for ButtonRole
impl Copy for ButtonRole
Source§impl Debug for ButtonRole
impl Debug for ButtonRole
Source§impl Default for ButtonRole
impl Default for ButtonRole
impl Eq for ButtonRole
Source§impl Hash for ButtonRole
impl Hash for ButtonRole
Source§impl IntoValue<ButtonRole> for ButtonRole
impl IntoValue<ButtonRole> for ButtonRole
fn into_value(self) -> Value<ButtonRole>
Source§impl PartialEq for ButtonRole
impl PartialEq for ButtonRole
impl StructuralPartialEq for ButtonRole
Auto Trait Implementations§
impl Forget for ButtonRole
impl Freeze for ButtonRole
impl Move 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