Adding a `Response::from_bytes()` API
- Dominant language
- Rust
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I think this would be better API than providing raw nom parsers. I tried to implement it but ran into some snags which I briefly mentioned on Discord. Capturing here because it's probably a better venue:
If we implement a generic `Response::from_bytes()` API I don't think we can easily keep the `Greeting` and `Ehlo` variants
because those are really just more specific cases of `Reply_lines`/`Other`. I would be inclined to simplify `Response` to just be what `Response::Other` is now, it could provide `as_greeting()` and `as_ehlo()` methods instead that handle further parsing? The question here is if the connection state is allowed to influence parsing; IMO it's better to keep these separate where possible.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.