pub struct AppState {
pub runtime: CortiqRuntime,
pub tokenizer: Arc<Tokenizer>,
pub slots: PipelinePool,
pub remote: Option<Arc<Mutex<RemoteSegment>>>,
}Expand description
Shared application state: runtime (masks, metrics), a tokenizer handle that never blocks on generation, and the slot pool.
Fields§
§runtime: CortiqRuntime§tokenizer: Arc<Tokenizer>§slots: PipelinePool§remote: Option<Arc<Mutex<RemoteSegment>>>Network pipeline-split worker (serve –peer). One worker holds one KV session, so peer mode runs with exactly one slot; the mutex is never contended (the slot semaphore already serializes) but keeps the type honest.
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin 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