[][src]Function mail_core::default_impl::simple_context::new

pub fn new(
    domain: Domain,
    unique_part: SoftAsciiString
) -> Result<Context, ContextSetupError>

create a new CompositeContext<FsResourceLoader, CpuPool, HashedIdGen>

It uses the current working directory as root for the FsResourceLoader, and the default settings for the CpuPool, both the domain and unique_part are passed to the HashedIdGen::new constructor.

Note that the combination of unique_part and domain should be world unique. This is needed to generate Content-Id and Message-Id reliably correctly. This means if you run multiple instances of softer using a context or you create multiple contexts they should not use the same unique_part under any circumstances (expect if they use different domains, but then you also should only use domain you actually own).