pub struct Config {Show 18 fields
pub debug: bool,
pub host: String,
pub port: u16,
pub server: String,
pub https: bool,
pub tls: TlsConfig,
pub log: bool,
pub write_timeout: u64,
pub read_timeout: u64,
pub root_path: PathBuf,
pub public: String,
pub webpage: String,
pub runtime: String,
pub origin: Vec<String>,
pub charset: String,
pub gzip: bool,
pub token: String,
pub pub_key_path: String,
}Fields§
§debug: bool调试
host: String主机
port: u16端口
server: String是否以及如何通过Server标头进行识别。
https: boolSSL/TLS
tls: TlsConfig§log: bool日志记录
write_timeout: u64写入超时时间
read_timeout: u64读取超时时间
root_path: PathBuf运行根目录
public: String公开目录
webpage: String网页目录
runtime: String运行时目录
origin: Vec<String>配置源
charset: String语言
gzip: bool§token: String密钥token
pub_key_path: String密钥文件路径
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