stratis-storage / stratisd

Easy to use local storage management for Linux.
https://stratis-storage.github.io
Mozilla Public License 2.0
793 stars 56 forks source link

stratis-min: Detect bad format unlock method in parser and not at runtime (also for Uuid) #3641

Open mulkieran opened 1 month ago

mulkieran commented 1 month ago

In theory, we can do this with value_parser() method[1]. In practice, it is very hard to figure out how to use that method with the implementation of UnlockMethod, although in theory there is a macro value_parser which should work. All this is only minimally documented.

There is more or less the same problem for Uuid.

[1] https://docs.rs/clap/latest/clap/struct.Arg.html#method.value_parser