Skip to content

Use imap-codec for command parsing, add Folder enum#14

Merged
dannywillems merged 1 commit intomasterfrom
use-imap-codec-and-folder-enum
Feb 9, 2026
Merged

Use imap-codec for command parsing, add Folder enum#14
dannywillems merged 1 commit intomasterfrom
use-imap-codec-and-folder-enum

Conversation

@dannywillems
Copy link
Contributor

Summary

  • Replace ad-hoc string matching in the fake IMAP server with imap-codec's CommandCodec for strongly-typed IMAP command dispatch — handlers now receive parsed types (SearchKey, SequenceSet, Mailbox) instead of raw strings
  • Add a Folder enum (Inbox, Sent, Drafts, Trash, Spam, Archive, Custom(String)) in src/folder.rs to replace raw &str folder parameters across the public client API, CLI, and test suite
  • Enables reliable date-range filtering and easier addition of new IMAP query types

Test plan

  • All 36 unit/integration tests pass
  • 1 doctest passes
  • cargo clippy --all-targets clean
  • cargo +nightly fmt -- --check clean
  • No trailing whitespace

Replace ad-hoc string matching in the fake IMAP server with
imap-codec's CommandCodec for strongly-typed IMAP command dispatch.
Handlers now receive parsed types (SearchKey, SequenceSet, Mailbox)
instead of raw strings, enabling reliable date-range filtering and
easier addition of new query types.

Add a Folder enum (Inbox, Sent, Drafts, Trash, Spam, Archive,
Custom) to replace raw &str folder parameters across the public
API, CLI, and test suite.
@dannywillems dannywillems merged commit 6b8586c into master Feb 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant