pub struct Config {Show 16 fields
pub debug: bool,
pub host: String,
pub https: bool,
pub tls: TlsConfig,
pub log: bool,
pub root_path: PathBuf,
pub public: String,
pub webpage: String,
pub runtime: String,
pub charset: String,
pub token: String,
pub pub_key_path: String,
pub max_body_size: usize,
pub read_timeout: u64,
pub write_timeout: u64,
pub max_connections: usize,
}Fields§
§debug: bool调试
host: String主机
https: boolSSL/TLS
tls: TlsConfig§log: bool日志记录
root_path: PathBuf运行根目录
public: String公开目录
webpage: String网页目录
runtime: String运行时目录
charset: String语言
token: String密钥token
pub_key_path: String密钥文件路径
max_body_size: usize最大请求体大小 (字节),默认 10MB
read_timeout: u64读取超时 (秒)
write_timeout: u64写入超时 (秒)
max_connections: usize最大连接数,默认 1024
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 UnsafeUnpin 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