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
Internal response type produced by RuntimeEngine. The IPC layer converts
this to a v1 RuntimeResponse or v2 RuntimeResponseV2 based on the
request’s api_version.
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