Skip to main content

Crate use_email_id

Crate use_email_id 

Source
Expand description

§use-email-id

Message identity and threading primitives for RustUse.

§Experimental

use-email-id is experimental while use-email remains below 0.3.0.

§Example

use use_email_id::{InReplyTo, MessageId, References};

let root: MessageId = "<root@example.com>".parse()?;
let reply: MessageId = "reply@example.com".parse()?;
let references = References::new().with_message_id(root.clone()).with_message_id(reply.clone());
let in_reply_to = InReplyTo::new(root);

assert_eq!(reply.to_string(), "<reply@example.com>");
assert_eq!(references.len(), 2);
assert!(in_reply_to.to_string().contains("root@example.com"));

§Scope

  • Message-ID local/domain wrappers and angle-bracket formatting.
  • References, In-Reply-To, and thread reference containers.
  • Conservative validation for typed identity strings.

§Non-goals

  • Message store or mailbox threading algorithms.
  • Global uniqueness guarantees.
  • Complete RFC parser behavior.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

InReplyTo
In-Reply-To message id wrapper.
MessageId
Message-ID value rendered with angle brackets.
MessageIdDomain
Message-ID domain part.
MessageIdLocal
Message-ID local part.
References
Ordered References header values.
ThreadReference
Simple thread reference path rooted at one message id.

Enums§

MessageIdError
Error returned when message identity primitives fail validation.