pub struct AppState {
pub current: PathBuf,
pub tx: Sender<String>,
pub clients: Arc<AtomicUsize>,
}Expand description
Shared server state.
Fields§
§current: PathBufThe project the daemon was started in (default target).
tx: Sender<String>Broadcast channel for live-update notifications.
clients: Arc<AtomicUsize>Number of live UI WebSocket clients. Drives idle-shutdown: when this is 0 for long enough, an auto-served daemon exits.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl UnwindSafe for AppState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more