INNER CODE UNIT · Rust
default
shenmintao/marginalia · desktop/src-tauri/src/lib.rs:111
fn default() -> Self {
Self {
state: "starting".to_string(),
message: None,
}
}
}
#[derive(Default)]
struct BackendState {
child: Mutex<Option<Child>>,
port: Mutex<Option<u16>>,
base_url: Mutex<Option<String>>,
status: Mutex<BackendStatusInfo>,
}
/// Pick an ephemeral port the OS marks as currently free. There's a small
/// TOCTOU window between drop and the python sidecar's bind, but the OS is