pub trait MailIdGenComponent: Debug + Send + Sync + 'static {
    fn generate_message_id(&self) -> MessageId;
    fn generate_content_id(&self) -> ContentId;
}
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

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

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

Implementors

Allows using a part of an context as an component.