pub struct RuntimeEngine { /* private fields */ }Implementations§
Source§impl RuntimeEngine
impl RuntimeEngine
pub fn new(pack: LoadedModelPack) -> Self
pub fn with_invoke_handler(self, handler: Arc<dyn InvokeHandler>) -> Self
Sourcepub fn with_log_sink(self, sink: Arc<dyn HostLogSink>) -> Self
pub fn with_log_sink(self, sink: Arc<dyn HostLogSink>) -> Self
Replace the default StderrLogSink with a custom sink. Tests
inject a capturing sink to verify log bounds and content
without capturing stderr.
Sourcepub fn with_handler_identity(self, identity: HandlerIdentity) -> Self
pub fn with_handler_identity(self, identity: HandlerIdentity) -> Self
Attach handler identity and effective capabilities for IPC v2 handshake.
Sourcepub fn effective_capabilities(&self) -> &[String]
pub fn effective_capabilities(&self) -> &[String]
Effective capability set (intersection of model and handler). Empty when no handler is loaded.
Sourcepub fn handler_identity(&self) -> Option<&HandlerIdentity>
pub fn handler_identity(&self) -> Option<&HandlerIdentity>
Handler identity if a handler was loaded.
pub fn handle(&self, request: RuntimeRequest) -> EngineResponse
Trait Implementations§
Source§impl Clone for RuntimeEngine
impl Clone for RuntimeEngine
Source§fn clone(&self) -> RuntimeEngine
fn clone(&self) -> RuntimeEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RuntimeEngine
impl !UnwindSafe for RuntimeEngine
impl Freeze for RuntimeEngine
impl Send for RuntimeEngine
impl Sync for RuntimeEngine
impl Unpin for RuntimeEngine
impl UnsafeUnpin for RuntimeEngine
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more