pub struct Config {Show 19 fields
pub is_debug: bool,
pub host: String,
pub port: u16,
pub ident: String,
pub is_client_ip: bool,
pub keep_alive: u32,
pub https: bool,
pub tls: TlsConfig,
pub is_save_log: bool,
pub write_timeout: u64,
pub read_timeout: u64,
pub root_path: String,
pub public: String,
pub webpage: String,
pub web_doc: String,
pub runtime: String,
pub origin: Vec<String>,
pub charset: String,
pub is_encoding: bool,
}
Fields§
§is_debug: bool
是否调试
host: String
主机
port: u16
端口
ident: String
是否以及如何通过Server标头进行识别。
is_client_ip: bool
检查IP标头以获取客户端的真实IP。X-Real-IP
keep_alive: u32
保持活力超时秒;0时禁用。
https: bool
SSL/TLS
tls: TlsConfig
§is_save_log: bool
是否保存日志
write_timeout: u64
写入超时时间
read_timeout: u64
读取超时时间
root_path: String
运行根目录
public: String
公开目录
webpage: String
网页目录
web_doc: String
网页默认文档
runtime: String
运行时目录
origin: Vec<String>
配置源
charset: String
语言
is_encoding: bool
是否压缩
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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