Trait MailIdGenComponent

Source
pub trait MailIdGenComponent:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn generate_message_id(&self) -> MessageId;
    fn generate_content_id(&self) -> MessageId;
}
Expand description

Trait needed to be implemented for providing the id generation parts to a CompositeContext.

It is possible/valid to use the same implementation (internal function etc.) for both message and content ids. While they are used at different places they have mostly the same constraints (their meaning is still different i.e. it’s much more important for an message id to be “world unique” then for an content id, expect in some cases where external bodies are used).

Required Methods§

Source

fn generate_message_id(&self) -> MessageId

Calls to Context::generate_message_id will be forwarded to this method.

Source

fn generate_content_id(&self) -> MessageId

Calls to Context::generate_content_id will be forwarded to this method.

Implementors§

Source§

impl MailIdGenComponent for HashedIdGen

Source§

impl<C> MailIdGenComponent for C
where C: Context,

Allows using a part of an context as an component.