option_ord

Crates.iooption_ord
lib.rsoption_ord
version0.1.1
sourcesrc
created_at2024-07-22 22:43:05.347615
updated_at2024-10-11 20:40:30.922203
descriptionconfigure ordering on 1+T with the 1 either smallest or largest, explicit vs derive default
homepage
repositoryhttps://github.com/Cobord/option_ord
max_upload_size
id1312212
size6,138
Ammar Husain (Cobord)

documentation

README

proc macro so that

struct MyOption(Option) where T : Ord;

becomes transparent, and gets the implementation of Ord where the None is bigger/smaller than all the Some(_)

and without generics as well as in #[transparent_option_ord(true)] struct MyOption(Option); which puts None as smaller than everything else

Commit count: 7

cargo fmt