pub enum Prop {
Show 13 variants
Title(String),
Text(String),
Label(String),
Value(String),
Placeholder(String),
Checked(bool),
Enabled(bool),
TextStyle(TextStyle),
Variant(ButtonVariant),
ScrollAxes(ScrollAxes),
Custom(CustomProps),
Drawing(DisplayList),
Native(Opaque),
}Expand description
A property of a native widget. Which ones apply depends on the kind.
Variants§
Title(String)
Window title.
Text(String)
Text content of a Text.
Label(String)
Caption of a Button, Checkbox or Switch.
Value(String)
Current text of a TextInput.
Placeholder(String)
Checked(bool)
Enabled(bool)
TextStyle(TextStyle)
Variant(ButtonVariant)
ScrollAxes(ScrollAxes)
Which axes a ScrollView scrolls.
Custom(CustomProps)
A custom widget’s props, with its renders.
Drawing(DisplayList)
What a drawn custom widget shows. Computed by the core after layout, so it arrives with the frames.
Native(Opaque)
A Native node’s factory (on create), then its updates: payloads in
the backend’s own form.
Implementations§
Source§impl Prop
impl Prop
Sourcepub fn key(&self) -> Discriminant<Prop>
pub fn key(&self) -> Discriminant<Prop>
Two props with the same key replace each other.
Sourcepub fn affects_measure(&self) -> bool
pub fn affects_measure(&self) -> bool
Whether changing this prop can change the widget’s intrinsic size.
Trait Implementations§
impl StructuralPartialEq for Prop
Auto Trait Implementations§
impl !RefUnwindSafe for Prop
impl !Send for Prop
impl !Sync for Prop
impl !UnwindSafe for Prop
impl Freeze for Prop
impl Unpin for Prop
impl UnsafeUnpin for Prop
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