pub struct AppRuntime<R> { /* private fields */ }Implementations§
Source§impl<R: RoutingTable + Send + Sync + 'static> AppRuntime<R>
impl<R: RoutingTable + Send + Sync + 'static> AppRuntime<R>
pub fn new( config: BitrouterConfig, paths: RuntimePaths, routing_table: R, ) -> Self
pub fn paths(&self) -> &RuntimePaths
pub fn config(&self) -> &BitrouterConfig
pub fn routing_table(&self) -> &R
pub fn control_client(&self) -> ControlClient
pub fn status(&self) -> RuntimeStatus
pub async fn serve<M>(self, model_router: M) -> Result<()>
pub async fn start(&self) -> Result<()>
pub async fn stop(&self) -> Result<()>
pub async fn restart(&self) -> Result<()>
Source§impl AppRuntime<ConfigRoutingTable>
Convenience constructors for the default ConfigRoutingTable.
impl AppRuntime<ConfigRoutingTable>
Convenience constructors for the default ConfigRoutingTable.
Sourcepub fn load(paths: RuntimePaths) -> Result<Self>
pub fn load(paths: RuntimePaths) -> Result<Self>
Load config from resolved paths. The .env file (if it exists) is loaded
automatically from paths.env_file.
Sourcepub fn scaffold(paths: RuntimePaths) -> Self
pub fn scaffold(paths: RuntimePaths) -> Self
Build a runtime with default config (no file on disk).
Loads builtin providers with env_prefix resolution so that
environment-provided API keys (e.g. OPENAI_API_KEY) are
automatically picked up even without a config file.
Auto Trait Implementations§
impl<R> Freeze for AppRuntime<R>where
R: Freeze,
impl<R> RefUnwindSafe for AppRuntime<R>where
R: RefUnwindSafe,
impl<R> Send for AppRuntime<R>where
R: Send,
impl<R> Sync for AppRuntime<R>where
R: Sync,
impl<R> Unpin for AppRuntime<R>where
R: Unpin,
impl<R> UnsafeUnpin for AppRuntime<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for AppRuntime<R>where
R: UnwindSafe,
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