pub struct AppState {
pub engine: Arc<Engine>,
pub config: Arc<Config>,
pub semaphore: Arc<Semaphore>,
}Fields§
§engine: Arc<Engine>§config: Arc<Config>§semaphore: Arc<Semaphore>Caps how many questions are in flight against the host at once.
Ollama serialises beyond its own parallelism setting, so firing an unbounded number of questions at it turns a burst into a queue with no backpressure. A bound keeps the latency of any single request predictable.
Implementations§
Trait Implementations§
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