#[non_exhaustive]pub enum EngineResponse {
Handshake {
request_id: String,
runtime_version: String,
model_pack_id: String,
model_pack_version: String,
capabilities: Vec<String>,
handler: Option<HandlerIdentity>,
},
Health {
request_id: String,
healthy: bool,
model_pack_id: String,
model_pack_version: String,
},
Result {
request_id: String,
output: Value,
},
Error {
request_id: String,
code: String,
message: String,
retryable: bool,
},
}Expand description
Engine-side response produced by RuntimeEngine. The IPC layer converts
this to a v1 RuntimeResponse or v2 RuntimeResponseV2 based on the
request’s api_version.
This type is part of the 1.x stable API because it is the return type of
RuntimeEngine::handle. Downstream consumers that embed the engine
(rather than using the rill-runtime CLI) call handle and then convert
the result to the appropriate wire version.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl EngineResponse
impl EngineResponse
Sourcepub fn to_v1(&self, api_version: u32) -> RuntimeResponse
pub fn to_v1(&self, api_version: u32) -> RuntimeResponse
Convert to a v1 wire response. Handler identity fields are dropped.
Sourcepub fn to_v2(&self, api_version: u32) -> RuntimeResponseV2
pub fn to_v2(&self, api_version: u32) -> RuntimeResponseV2
Convert to a v2 wire response. If no handler is loaded, handler fields are filled with empty/zero values and effective_capabilities equals the model capabilities.
Trait Implementations§
Source§impl Clone for EngineResponse
impl Clone for EngineResponse
Source§fn clone(&self) -> EngineResponse
fn clone(&self) -> EngineResponse
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 Freeze for EngineResponse
impl RefUnwindSafe for EngineResponse
impl Send for EngineResponse
impl Sync for EngineResponse
impl Unpin for EngineResponse
impl UnsafeUnpin for EngineResponse
impl UnwindSafe for EngineResponse
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