jonhoo / jonhoo/rust-imap

Provide variants of all interfaces with typed arguments

Open
#99 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted tombstone
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.