pub struct AppConfig {Show 15 fields
pub app_name: String,
pub profile: String,
pub server: ServerConfig,
pub log: LogConfig,
pub database: DatabaseConfig,
pub redis: RedisConfig,
pub cache: CacheConfig,
pub middleware: MiddlewareConfig,
pub router: RouterConfig,
pub plugins: PluginsConfig,
pub upload: UploadConfig,
pub download: DownloadConfig,
pub template: TemplateConfig,
pub static_files: StaticConfig,
pub custom: HashMap<String, Value>,
}Expand description
完整应用配置——Settings + Routes + Plugins 三合一
Fields§
§app_name: String应用名称
profile: String当前激活的 profile(dev/prod/test)
server: ServerConfig服务器配置
log: LogConfig日志配置
database: DatabaseConfig数据库配置
redis: RedisConfigRedis 配置
cache: CacheConfig缓存配置
middleware: MiddlewareConfig中间件配置
router: RouterConfig路由配置
plugins: PluginsConfig插件配置
upload: UploadConfig上传配置
download: DownloadConfig下载配置
template: TemplateConfig模板配置
static_files: StaticConfig静态文件配置
custom: HashMap<String, Value>自定义配置(供插件运行时读写)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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 AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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