Derive PartialOrd for enums #5295
Answered
by
ogoffart
otiv-wannes-vanleemput
asked this question in
Ideas
-
Hi! First of all, loving the combination of Slint components states and enums. Slint file:
Rust file:
This way, you don't have to check explicitly what state the enum variable is in. |
Beta Was this translation helpful? Give feedback.
Answered by
ogoffart
May 28, 2024
Replies: 1 comment
-
There is this (not well documented) feature to add rust attributes to struct and enum with @rust-attr(derive(PartialOrd))
export enum UIState {
startup-state-one,
startup-state-two,
main-state-one,
main-state-two
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
otiv-wannes-vanleemput
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is this (not well documented) feature to add rust attributes to struct and enum with
@rust-attr
: