1 2 3 4 5 6 7 8 9 10 11 12 13 14
//! 会话模块 /// 编译会话 pub struct Session { /// 会话 ID id: String, } impl Session { /// 创建新的会话 pub fn new(id: &str) -> Self { Self { id: id.to_string() } } }