pub struct Config {
pub server_port: u16,
pub remote_base: String,
}Expand description
应用程序配置
包含服务器运行所需的所有配置项。 支持从环境变量加载,并提供合理的默认值。
Fields§
§server_port: u16服务器监听端口
默认值为8080,可通过SERVER_PORT环境变量设置
remote_base: String远程API基础URL
默认值为MSR官方API地址,可通过REMOTE_BASE环境变量设置
Implementations§
Trait Implementations§
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)