pub struct Button {
pub color: ButtonColor,
pub action: ButtonAction,
}Expand description
The main type of a button that defines a color and a action
Fields§
§color: ButtonColorColor of a button
action: ButtonActionKind of a button
Implementations§
Source§impl Button
Methods of a button
impl Button
Methods of a button
Sourcepub fn new(color: ButtonColor, action: ButtonAction) -> Self
pub fn new(color: ButtonColor, action: ButtonAction) -> Self
Create a button with color and action
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Button
impl<'de> Deserialize<'de> for Button
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnwindSafe for Button
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