strongly typed ?
- Dominant language
- Rust
- Stars
- 0
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Should we consider make the parser strongly typed:
```
#[repr(transparent)]
struct Alpha {
c: char,
}
pub fn alpha(input: I) -> IResult
where
I: InputIter + Slice>,
::Item: AsChar,
E: ParseError,
{
let (input, c) = satisfy(is_alpha)(input)?;
Ok((input, Alpha { c }))
}
```
Pro:
- Allow compile time check
- If the user want this, this will reduce the code of user side
- most user will discard this anyway so no call to `into_inner()`
- Increase debug info.
Con:
- User side that don't want it could require call like `into_inner()` to get rid of the wrapper.
- make lib more heavy
Maybe as a feature ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.