[−][src]Module mail_core::default_impl::simple_context
This module provides a type alias and constructor function for an simple context impl.
It used the FsResourceLoader
and CpuPool
with a CompositeContext
.
Note this module is only available if the default_impl_cpupool
feature
is enabled.
Example
use mail::default_impl::simple_context; //TODO[FEAT]: use parse once the `Domain` component implements `FromStr`. //let domain = "example.com".parse().unwrap(); let domain = Domain::from_unchecked("example.com".to_owned()); // This normally should be world unique for any usage with the same domain. // This is necessary to generate `Content-Id` and `Message-Id` correctly. let ascii_unique_part = "xm3r2u".parse().unwrap(); let ctx = simple_context::new(domain, ascii_unique_part).unwrap();
Enums
ContextSetupError | Error returned when creating a "simple_context" fails. |
Functions
new | create a new CompositeContext<FsResourceLoader, CpuPool, HashedIdGen> |
Type Definitions
Context | Type Alias for a the type returned by |