pub struct LabelElement {
pub text: String,
pub system_name: String,
pub icon_color: Option<ColorValue>,
pub font_size: Option<f64>,
pub font_weight: Option<FontWeight>,
pub color: Option<ColorValue>,
pub spacing: Option<f64>,
pub style: ElementStyle,
}Expand description
Convenience element combining an SF Symbol / icon with text.
Fields§
§text: StringLabel text.
system_name: StringSF Symbol or platform icon name.
icon_color: Option<ColorValue>Icon tint color.
font_size: Option<f64>Text font size.
font_weight: Option<FontWeight>Text font weight.
color: Option<ColorValue>Text color.
spacing: Option<f64>Space between icon and text.
style: ElementStyleShared visual style (padding, background, frame, …).
Trait Implementations§
Source§impl Clone for LabelElement
impl Clone for LabelElement
Source§fn clone(&self) -> LabelElement
fn clone(&self) -> LabelElement
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 LabelElement
impl Debug for LabelElement
Source§impl Default for LabelElement
impl Default for LabelElement
Source§fn default() -> LabelElement
fn default() -> LabelElement
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LabelElement
impl<'de> Deserialize<'de> for LabelElement
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<LabelElement> for WidgetElement
impl From<LabelElement> for WidgetElement
Source§fn from(value: LabelElement) -> Self
fn from(value: LabelElement) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for LabelElement
impl JsonSchema for LabelElement
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 LabelElement
impl RefUnwindSafe for LabelElement
impl Send for LabelElement
impl Sync for LabelElement
impl Unpin for LabelElement
impl UnsafeUnpin for LabelElement
impl UnwindSafe for LabelElement
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