pub struct EnterpriseConfig {
pub profile: RuntimeProfile,
pub tls: TlsPolicy,
pub auth: AuthPolicy,
pub telemetry: TelemetryPolicy,
}Available on crate feature
enterprise only.Expand description
Fields§
§profile: RuntimeProfileSelected runtime profile.
tls: TlsPolicyTLS and mTLS policy.
auth: AuthPolicyAuthentication policy.
telemetry: TelemetryPolicyTelemetry policy.
Implementations§
Source§impl EnterpriseConfig
impl EnterpriseConfig
Sourcepub fn load_from_file(path: &Path) -> Result<Self, ServerError>
pub fn load_from_file(path: &Path) -> Result<Self, ServerError>
Sourcepub fn save_to_file(&self, path: &Path) -> Result<(), ServerError>
pub fn save_to_file(&self, path: &Path) -> Result<(), ServerError>
Writes enterprise configuration as TOML.
§Examples
use http_handle::enterprise::EnterpriseConfig;
use std::path::Path;
let cfg = EnterpriseConfig::default();
let _ = cfg.save_to_file(Path::new("enterprise.toml"));§Errors
Returns an error when serialization or file write fails.
§Panics
This function does not panic.
Sourcepub fn production_baseline() -> Self
pub fn production_baseline() -> Self
Trait Implementations§
Source§impl Clone for EnterpriseConfig
impl Clone for EnterpriseConfig
Source§fn clone(&self) -> EnterpriseConfig
fn clone(&self) -> EnterpriseConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnterpriseConfig
impl Debug for EnterpriseConfig
Source§impl Default for EnterpriseConfig
impl Default for EnterpriseConfig
Source§fn default() -> EnterpriseConfig
fn default() -> EnterpriseConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnterpriseConfig
impl<'de> Deserialize<'de> for EnterpriseConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EnterpriseConfig
impl PartialEq for EnterpriseConfig
Source§impl Serialize for EnterpriseConfig
impl Serialize for EnterpriseConfig
impl Eq for EnterpriseConfig
impl StructuralPartialEq for EnterpriseConfig
Auto Trait Implementations§
impl Freeze for EnterpriseConfig
impl RefUnwindSafe for EnterpriseConfig
impl Send for EnterpriseConfig
impl Sync for EnterpriseConfig
impl Unpin for EnterpriseConfig
impl UnsafeUnpin for EnterpriseConfig
impl UnwindSafe for EnterpriseConfig
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.