Provide variants of all interfaces with typed arguments
- Dominant language
- Rust
- Stars
- 583
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Most of the APIs we currently expose take `&str` arguments whose format is strictly dictated by [RFC 3501](https://tools.ietf.org/html/rfc3501). That's unfortunate, because it makes it easy for users to do things that are incorrect. Instead, we should write up typed versions of all those APIs (probably using the [builder pattern](https://rust-lang-nursery.github.io/api-guidelines/type-safety.html#c-builder)) such that none of the APIs can be misused. We *may* want to just provide builders for the most common arguments, and then continue to expose string-only APIs for the more esoteric use-cases.
This should help with #74, and would be a good way to deal with #60.
See the original issue here: https://github.com/mattnenterprise/rust-imap/issues/99
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inventorying the exposed APIs that accept &str values governed by RFC 3501, then identify which arguments are common enough for typed builders. Review Rust's type-safety builder-pattern guidance and the related issues #74 and #60. Done means the API offers typed variants that prevent misuse while retaining string-only access where necessary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100