refactor: move server rs workspace entries into crates
This commit is contained in:
15
server-rs/crates/api-server/src/state.rs
Normal file
15
server-rs/crates/api-server/src/state.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use crate::config::AppConfig;
|
||||
|
||||
// 当前阶段先保留最小共享状态壳,后续逐步接入配置、客户端与平台适配。
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct AppState {
|
||||
// 配置会在后续中间件、路由和平台适配接入时逐步消费。
|
||||
#[allow(dead_code)]
|
||||
pub config: AppConfig,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
pub fn new(config: AppConfig) -> Self {
|
||||
Self { config }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user