pub struct ServerConfig {Show 15 fields
pub control_listen: SocketAddr,
pub control_token: Option<String>,
pub data_dir: PathBuf,
pub harness_enabled: bool,
pub harness_bin: Option<PathBuf>,
pub harness_args: Vec<String>,
pub memory_bin: PathBuf,
pub m4a_enabled: bool,
pub m4a_master_key_var: Option<String>,
pub provision_c2_addr: Option<String>,
pub provision_c2_token_var: String,
pub provision_interval_secs: u64,
pub m4a_server_ref: String,
pub mail_domain: String,
pub policy_path: Option<PathBuf>,
}Fields§
§control_listen: SocketAddr§control_token: Option<String>§data_dir: PathBuf§harness_enabled: bool§harness_bin: Option<PathBuf>§harness_args: Vec<String>§memory_bin: PathBuf§m4a_enabled: bool§m4a_master_key_var: Option<String>§provision_c2_addr: Option<String>Provisioning is on only when m4a is enabled and a C2 address is configured.
provision_c2_token_var: String§provision_interval_secs: u64§m4a_server_ref: String§mail_domain: String§policy_path: Option<PathBuf>Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn from_env() -> Result<Self, ServerError>
pub fn from_env() -> Result<Self, ServerError>
Build from the process environment (and the file it points at).
Sourcepub fn resolve(
file: FileConfig,
env: impl Fn(&str) -> Option<String>,
) -> Result<Self, ServerError>
pub fn resolve( file: FileConfig, env: impl Fn(&str) -> Option<String>, ) -> Result<Self, ServerError>
Pure resolution (tests inject the environment).
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§impl Debug for ServerConfig
impl Debug for ServerConfig
impl Eq for ServerConfig
Source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.