CI/CD / Build Frontend (push) Failing after 11s
CI/CD / Test (macos-latest) (push) Has been cancelled
CI/CD / Test (windows-latest) (push) Has been cancelled
CI/CD / Build Desktop (linux) (push) Has been cancelled
CI/CD / Build Desktop (macos) (push) Has been cancelled
CI/CD / Build Desktop (windows) (push) Has been cancelled
CI/CD / Release (push) Has been cancelled
CI/CD / Test (ubuntu-latest) (push) Failing after 2s
- tscore: Protocol implementation (packets, crypto, connection handshake) - tsaudio: Audio engine (capture, playback, codec, VAD, jitter buffer) - tsdb: SQLite database (identities, bookmarks, messages, settings) - shared: Core types and events - tauri-app: Tauri v2 desktop application with React frontend - docs: SRS, SAD, SDD documentation - CI/CD: GitHub Actions workflow - 32 unit tests passing
30 lines
588 B
Rust
30 lines
588 B
Rust
//! 应用状态管理
|
|
|
|
/// 连接状态
|
|
#[derive(Debug, Clone)]
|
|
pub struct ConnectionState {
|
|
pub connected: bool,
|
|
pub server_address: Option<String>,
|
|
pub server_port: Option<u16>,
|
|
pub client_id: Option<u16>,
|
|
pub nickname: Option<String>,
|
|
}
|
|
|
|
impl ConnectionState {
|
|
pub fn new() -> Self {
|
|
Self {
|
|
connected: false,
|
|
server_address: None,
|
|
server_port: None,
|
|
client_id: None,
|
|
nickname: None,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for ConnectionState {
|
|
fn default() -> Self {
|
|
Self::new()
|
|
}
|
|
}
|