pub struct Runtime { /* private fields */ }Expand description
An optional atomic publication boundary for embedded applications. Hosts continue to own configuration storage, plugin loading and request cancellation.
Implementations§
Source§impl Runtime
impl Runtime
pub fn new( config: &RuntimeConfig, providers: &ProviderRegistry, values: &dyn ValueSource, request: &ModelRequest<'_>, ) -> Result<Self, ResolveError>
Sourcepub fn current(&self) -> Arc<ResolvedModel> ⓘ
pub fn current(&self) -> Arc<ResolvedModel> ⓘ
Cloned providers retain the original loader lease and private bindings.
pub fn snapshot(&self) -> Arc<RuntimeSnapshot> ⓘ
pub fn subscribe(&self) -> Receiver<Arc<RuntimeSnapshot>>
Sourcepub fn reload(
&mut self,
config: &RuntimeConfig,
providers: &ProviderRegistry,
values: &dyn ValueSource,
request: &ModelRequest<'_>,
) -> Result<(), ResolveError>
pub fn reload( &mut self, config: &RuntimeConfig, providers: &ProviderRegistry, values: &dyn ValueSource, request: &ModelRequest<'_>, ) -> Result<(), ResolveError>
Prepare everything before publishing. Failure leaves both the active providers and observable snapshot intact, without emitting a change.
Auto Trait Implementations§
impl !RefUnwindSafe for Runtime
impl !UnwindSafe for Runtime
impl Forget for Runtime
impl Freeze for Runtimewhere
*const ArcInner<ResolvedModel> is !null: Freeze,
PhantomData<ArcInner<ResolvedModel>>: Freeze,
*const ArcInner<Shared<Arc<RuntimeSnapshot>>> is !null: Freeze,
PhantomData<ArcInner<Shared<Arc<RuntimeSnapshot>>>>: Freeze,
impl Move for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtimewhere
*const ArcInner<ResolvedModel> is !null: UnsafeUnpin,
PhantomData<ArcInner<ResolvedModel>>: UnsafeUnpin,
*const ArcInner<Shared<Arc<RuntimeSnapshot>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<Arc<RuntimeSnapshot>>>>: UnsafeUnpin,
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