Skip to content

Derive PartialOrd for enums #5295

Discussion options

You must be logged in to vote

There is this (not well documented) feature to add rust attributes to struct and enum with @rust-attr:

@rust-attr(derive(PartialOrd))
export enum UIState {
    startup-state-one,
    startup-state-two,
    main-state-one,
    main-state-two
}

Replies: 1 comment

Comment options

You must be logged in to vote
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
Category
Ideas
Labels
None yet
2 participants