pub struct ButtonElement {
pub label: String,
pub url: Option<String>,
pub action: Option<String>,
pub color: Option<ColorValue>,
pub background_color: Option<ColorValue>,
pub font_size: Option<f64>,
pub text_alignment: Option<TextAlignment>,
pub style: ElementStyle,
}Expand description
Tappable button that opens a URL or emits widget-action.
Fields§
§label: StringButton label text.
url: Option<String>Deep link URL to open the app (used when no action is set).
action: Option<String>Action identifier — emits a widget-action Tauri event when tapped.
color: Option<ColorValue>Label text color.
background_color: Option<ColorValue>Button background color.
font_size: Option<f64>Label font size in points.
text_alignment: Option<TextAlignment>Label text alignment.
style: ElementStyleShared visual style (padding, background, frame, …).
Trait Implementations§
Source§impl Clone for ButtonElement
impl Clone for ButtonElement
Source§fn clone(&self) -> ButtonElement
fn clone(&self) -> ButtonElement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ButtonElement
impl Debug for ButtonElement
Source§impl Default for ButtonElement
impl Default for ButtonElement
Source§fn default() -> ButtonElement
fn default() -> ButtonElement
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ButtonElement
impl<'de> Deserialize<'de> for ButtonElement
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
Source§impl From<ButtonElement> for WidgetElement
impl From<ButtonElement> for WidgetElement
Source§fn from(value: ButtonElement) -> Self
fn from(value: ButtonElement) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for ButtonElement
impl JsonSchema for ButtonElement
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ButtonElement
impl RefUnwindSafe for ButtonElement
impl Send for ButtonElement
impl Sync for ButtonElement
impl Unpin for ButtonElement
impl UnsafeUnpin for ButtonElement
impl UnwindSafe for ButtonElement
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