pub struct LocalRuntimeBuilder { /* private fields */ }Expand description
Convenience wrapper around InProcessRuntimeBuilder that wires a local
profile + SQLite-backed task/schedule stores and a workspace file store.
Implementations§
Source§impl LocalRuntimeBuilder
impl LocalRuntimeBuilder
Sourcepub fn new(profile: LocalProfile) -> Self
pub fn new(profile: LocalProfile) -> Self
Start from a profile. Defaults the platform definition to built-ins via
InProcessRuntimeBuilder::new().
Sourcepub fn platform_definition(
self,
platform_definition: PlatformDefinition,
) -> Self
pub fn platform_definition( self, platform_definition: PlatformDefinition, ) -> Self
Replace the platform definition (capabilities, drivers, …). When set,
build() respects this definition instead of constructing the default
local one, so capability/driver overrides take effect. The caller is
then responsible for the session filesystem factory on their definition.
Sourcepub fn llm_sim(self, config: LlmSimConfig) -> Self
pub fn llm_sim(self, config: LlmSimConfig) -> Self
Register the built-in llmsim driver for deterministic local execution.
Sourcepub fn default_model(self, model: ResolvedModel) -> Self
pub fn default_model(self, model: ResolvedModel) -> Self
Set the runtime default model.
Sourcepub fn session_file_system_factory(
self,
factory: Arc<dyn SessionFileSystemFactory>,
) -> Self
pub fn session_file_system_factory( self, factory: Arc<dyn SessionFileSystemFactory>, ) -> Self
Override the session filesystem factory. By default a real-disk factory
rooted at profile.workspace_root is used.
Sourcepub fn inner_mut(&mut self) -> &mut InProcessRuntimeBuilder
pub fn inner_mut(&mut self) -> &mut InProcessRuntimeBuilder
Access the underlying InProcessRuntimeBuilder for advanced wiring.
Sourcepub async fn build(self) -> Result<(InProcessRuntime, LocalBackends)>
pub async fn build(self) -> Result<(InProcessRuntime, LocalBackends)>
Build the runtime and return it along with the constructed
LocalBackends so the embedder can attach a platform runner and reuse
the local stores. The task registry and schedule store factory are
installed on the runtime; the platform store is left to the embedder.
Auto Trait Implementations§
impl !RefUnwindSafe for LocalRuntimeBuilder
impl !UnwindSafe for LocalRuntimeBuilder
impl Freeze for LocalRuntimeBuilder
impl Send for LocalRuntimeBuilder
impl Sync for LocalRuntimeBuilder
impl Unpin for LocalRuntimeBuilder
impl UnsafeUnpin for LocalRuntimeBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request