#[repr(C)]pub enum ButtonType {
Default = 0,
Primary = 1,
Secondary = 2,
Success = 3,
Danger = 4,
Warning = 5,
Info = 6,
Link = 7,
}Expand description
The semantic type/role of a button.
Each type has distinct styling to indicate its purpose to the user. Colors are based on Bootstrap’s button variants for familiarity.
Variants§
Default = 0
Default button style - neutral/gray appearance
Primary = 1
Primary action button - blue, uses system accent color on macOS
Secondary = 2
Secondary button - gray, less prominent than primary
Success = 3
Success/confirmation button - green with white text
Danger = 4
Danger/destructive button - red with white text
Warning = 5
Warning button - yellow with BLACK text
Info = 6
Informational button - teal/cyan with white text
Link = 7
Link-style button - appears as a hyperlink, no background
Implementations§
Source§impl ButtonType
impl ButtonType
Sourcepub fn class_name(&self) -> &'static str
pub fn class_name(&self) -> &'static str
Get the CSS class name for this button type
Trait Implementations§
Source§impl Clone for ButtonType
impl Clone for ButtonType
Source§fn clone(&self) -> ButtonType
fn clone(&self) -> ButtonType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ButtonType
impl Debug for ButtonType
Source§impl Default for ButtonType
impl Default for ButtonType
Source§fn default() -> ButtonType
fn default() -> ButtonType
Returns the “default value” for a type. Read more
Source§impl Hash for ButtonType
impl Hash for ButtonType
Source§impl Ord for ButtonType
impl Ord for ButtonType
Source§fn cmp(&self, other: &ButtonType) -> Ordering
fn cmp(&self, other: &ButtonType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ButtonType
impl PartialEq for ButtonType
Source§impl PartialOrd for ButtonType
impl PartialOrd for ButtonType
impl Copy for ButtonType
impl Eq for ButtonType
impl StructuralPartialEq for ButtonType
Auto Trait Implementations§
impl Freeze for ButtonType
impl RefUnwindSafe for ButtonType
impl Send for ButtonType
impl Sync for ButtonType
impl Unpin for ButtonType
impl UnsafeUnpin for ButtonType
impl UnwindSafe for ButtonType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more