pub struct CoreConfig {Show 13 fields
pub data_dir: PathBuf,
pub db_path: PathBuf,
pub blobs_dir: PathBuf,
pub default_smtp_port: u16,
pub http_port: u16,
pub bind_host: BindHost,
pub max_message_bytes: u64,
pub ephemeral_port_range: (u16, u16),
pub ehlo_hostname: String,
pub smtp_max_line_bytes: usize,
pub data_spill_bytes: usize,
pub ingest_channel_capacity: usize,
pub tls: TlsConfig,
}Expand description
Configuration for the crate::Service.
Fields§
§data_dir: PathBuf§db_path: PathBuf§blobs_dir: PathBuf§default_smtp_port: u16§http_port: u16§bind_host: BindHost§max_message_bytes: u64§ephemeral_port_range: (u16, u16)§ehlo_hostname: StringEHLO hostname advertised to clients. Defaults to postcrate.local.
smtp_max_line_bytes: usizeSMTP receive line length (RFC 5321 §4.5.3.1.6 is 1000 incl. CRLF).
data_spill_bytes: usizeThreshold above which DATA streams to a tempfile.
ingest_channel_capacity: usizeBounded queue size between SMTP sessions and the ingest worker.
tls: TlsConfigSTARTTLS configuration. Disabled by default; enabling requires
the tls Cargo feature to be active on postcrate-core.
Implementations§
Source§impl CoreConfig
impl CoreConfig
Sourcepub fn for_data_dir(data_dir: impl Into<PathBuf>) -> Result<Self>
pub fn for_data_dir(data_dir: impl Into<PathBuf>) -> Result<Self>
Convenience constructor.
Sourcepub fn default_data_dir() -> Result<PathBuf>
pub fn default_data_dir() -> Result<PathBuf>
Resolve the platform-appropriate default data directory.
Trait Implementations§
Source§impl Clone for CoreConfig
impl Clone for CoreConfig
Source§fn clone(&self) -> CoreConfig
fn clone(&self) -> CoreConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CoreConfig
impl RefUnwindSafe for CoreConfig
impl Send for CoreConfig
impl Sync for CoreConfig
impl Unpin for CoreConfig
impl UnsafeUnpin for CoreConfig
impl UnwindSafe for CoreConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more