Oli Scherer
Oli Scherer
Cool! Please also add a test to our test suite showing a use of it
All of the `@foo` patterns are meant to be internal. You're not supposed to invoke them directly, but there should be convenient wrappers for them.
For example: the `scan!` macro invokes the `@impl unwrap` variant. So I don't think we should be exposing these variants in the documentation. We can add a `scan_opt!` macro that...
hmm... I like that. So we get rid of the `impl` and just use `@mode` for choosing one of the modes.
We should probably rename the modes to something more user friendly then. What do you think about the following list? * `@unwrap` or `@panic` * `@return_err` or `@?` * `@option`
at that point we could also start supporting these flags directly on `scan!` instead of `try_scan!`
I'm not sold on the capitalization of `panic` as `Panic`, but other than that, I agree with your selection, those keywords make it very clear.
Makes sense. Maybe we can also do something like `#[doc(hidden)]` or what that flag is? Not sure if that works on macro arms.
updated the repository readme, will also add documentation on the macro directly
If your pattern finishes with with anything but a capture, then that would work. So if your data contained a trailing `.` and your pattern was also finished by a...