pub enum WidgetKind {
Show 25 variants
Column,
Row,
Container,
Scrollable,
Stack,
Text,
Image,
Svg,
Button,
TextInput,
Checkbox,
Slider,
PickList,
Toggler,
Space,
Rule,
Radio,
ComboBox,
ProgressBar,
Tooltip,
Grid,
Canvas,
Float,
For,
Custom(String),
}Expand description
Enumeration of all supported widget types
Variants§
Column
Row
Container
Scrollable
Stack
Text
Image
Svg
Button
TextInput
Checkbox
Slider
PickList
Toggler
Space
Rule
Radio
ComboBox
ProgressBar
Tooltip
Grid
Canvas
Float
For
Custom(String)
Implementations§
Source§impl WidgetKind
impl WidgetKind
Sourcepub fn minimum_version(&self) -> SchemaVersion
pub fn minimum_version(&self) -> SchemaVersion
Returns the minimum schema version required for this widget type.
This method provides infrastructure for version-gating widgets in future releases. Currently, all widgets return version 1.0 as they are part of the initial release.
§Future Usage
When new widgets are added in future schema versions (e.g., 1.1, 1.2), this method will be updated to return the appropriate minimum version for those widgets. The parser can then validate that documents declaring older schema versions do not use widgets that were introduced in later versions.
§Examples
use dampen_core::{WidgetKind, SchemaVersion};
let column = WidgetKind::Column;
assert_eq!(column.minimum_version(), SchemaVersion { major: 1, minor: 0 });§Returns
The minimum SchemaVersion required to use this widget type.
Trait Implementations§
Source§impl Clone for WidgetKind
impl Clone for WidgetKind
Source§fn clone(&self) -> WidgetKind
fn clone(&self) -> WidgetKind
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 WidgetKind
impl Debug for WidgetKind
Source§impl Default for WidgetKind
impl Default for WidgetKind
Source§fn default() -> WidgetKind
fn default() -> WidgetKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WidgetKind
impl<'de> Deserialize<'de> for WidgetKind
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 Hash for WidgetKind
impl Hash for WidgetKind
Source§impl PartialEq for WidgetKind
impl PartialEq for WidgetKind
Source§impl Serialize for WidgetKind
impl Serialize for WidgetKind
impl Eq for WidgetKind
impl StructuralPartialEq for WidgetKind
Auto Trait Implementations§
impl Freeze for WidgetKind
impl RefUnwindSafe for WidgetKind
impl Send for WidgetKind
impl Sync for WidgetKind
impl Unpin for WidgetKind
impl UnwindSafe for WidgetKind
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