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: bool
SSL/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