pub struct ProviderHandle(/* private fields */);Expand description
A live view of the engine’s provider slot ([LlmEngine::provider_handle]).
Resolves the current provider at USE time, so a holder survives
[LlmEngine::set_provider] / [LlmEngine::set_provider_when_idle] swaps
(a /model switch). A provider cloned out of the engine at build time is
a boot-time snapshot: the guard’s completion judge kept judging on the old
model after a swap and treated that model’s own identity as the session’s
ground truth (session 20261107_27dc727a).
Implementations§
Source§impl ProviderHandle
impl ProviderHandle
Sourcepub fn new(initial: Arc<dyn LlmProvider>) -> Self
pub fn new(initial: Arc<dyn LlmProvider>) -> Self
A standalone handle over initial — for holders that get their handle
directly instead of from an engine (and for tests).
Sourcepub fn current(&self) -> Arc<dyn LlmProvider> ⓘ
pub fn current(&self) -> Arc<dyn LlmProvider> ⓘ
The provider currently in the slot.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ProviderHandle
impl Freeze for ProviderHandle
impl RefUnwindSafe for ProviderHandle
impl Send for ProviderHandle
impl Sync for ProviderHandle
impl Unpin for ProviderHandle
impl UnsafeUnpin for ProviderHandle
impl UnwindSafe for ProviderHandle
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