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 Freeze for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
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