pub struct ServeConfig {
pub bind: String,
pub shutdown_grace_secs: u64,
pub trusted_proxies: Vec<String>,
pub log_format: String,
pub pwa: bool,
pub api_rate_limit_per_min: u32,
pub max_body_bytes: usize,
pub metrics_token: Option<String>,
pub security_contact: Option<String>,
pub security_expires: Option<String>,
}Fields§
§bind: String§shutdown_grace_secs: u64§trusted_proxies: Vec<String>§log_format: String§pwa: bool§api_rate_limit_per_min: u32§max_body_bytes: usize§metrics_token: Option<String>§security_contact: Option<String>§security_expires: Option<String>Implementations§
Source§impl ServeConfig
impl ServeConfig
Sourcepub fn from_toml_str(src: &str) -> Result<Self, String>
pub fn from_toml_str(src: &str) -> Result<Self, String>
Parse a minimal TOML config file (zero external TOML crate dependency).
pub fn from_file(path: &Path) -> Result<Self, String>
pub fn validate(&self) -> Result<(), String>
pub fn summary_map(&self) -> BTreeMap<&'static str, String>
Trait Implementations§
Source§impl Clone for ServeConfig
impl Clone for ServeConfig
Source§impl Debug for ServeConfig
impl Debug for ServeConfig
Source§impl Default for ServeConfig
impl Default for ServeConfig
impl Eq for ServeConfig
Source§impl PartialEq for ServeConfig
impl PartialEq for ServeConfig
impl StructuralPartialEq for ServeConfig
Auto Trait Implementations§
impl Forget for ServeConfig
impl Freeze for ServeConfig
impl Move for ServeConfig
impl RefUnwindSafe for ServeConfig
impl Send for ServeConfigwhere
RawVecInner: Send,
impl Sync for ServeConfigwhere
RawVecInner: Sync,
impl Unpin for ServeConfig
impl UnsafeUnpin for ServeConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ServeConfigwhere
RawVecInner: UnwindSafe,
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