pub trait InferenceHandler {
Show 35 methods
// Required methods
fn handle_generate_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 GenerationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_model_info<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_is_ready<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_apply_chat_template<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ChatTemplateRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_create_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_load_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_save_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_unload_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_has_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_set_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_clear_session<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_release_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_health_check<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_shutdown<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_ttt_writeback<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_ttt_evict<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_train_step<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_ttt_zero<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_get_delta_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_save_adaptation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_snapshot_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_train_step_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_export_peft_adapter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_merge_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_create_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_load_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_save_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_save_adaptation_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_snapshot_delta_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_export_peft_adapter_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_merge_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_embed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 EmbedImagesRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_get_layer_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Expand description
Generated handler trait for the Inference service.
Required Methods§
Sourcefn handle_generate_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 GenerationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_generate_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 GenerationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle generateStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_model_info<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_model_info<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle modelInfo request.
Sourcefn handle_is_ready<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_is_ready<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle isReady request.
Sourcefn handle_apply_chat_template<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ChatTemplateRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_apply_chat_template<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ChatTemplateRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle applyChatTemplate request.
Sourcefn handle_create_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_create_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle createLora request.
Sourcefn handle_load_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_load_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle loadLora request.
Sourcefn handle_save_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_save_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle saveLora request.
Sourcefn handle_unload_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_unload_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle unloadLora request.
Sourcefn handle_has_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_has_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle hasLora request.
Sourcefn handle_set_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_set_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle setSession request.
Sourcefn handle_clear_session<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_clear_session<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle clearSession request.
Sourcefn handle_release_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_release_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle releaseSession request.
Sourcefn handle_health_check<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_health_check<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle healthCheck request.
Sourcefn handle_shutdown<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_shutdown<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle shutdown request.
Sourcefn handle_ttt_writeback<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_ttt_writeback<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle tttWriteback request.
Sourcefn handle_ttt_evict<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_ttt_evict<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle tttEvict request.
Sourcefn handle_train_step<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_train_step<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle trainStep request.
Sourcefn handle_ttt_zero<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_ttt_zero<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle tttZero request.
Sourcefn handle_get_delta_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_get_delta_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle getDeltaStatus request.
Sourcefn handle_save_adaptation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_save_adaptation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle saveAdaptation request.
Sourcefn handle_snapshot_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_snapshot_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle snapshotDelta request.
Sourcefn handle_train_step_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_train_step_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle trainStepStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_export_peft_adapter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_export_peft_adapter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle exportPeftAdapter request.
Sourcefn handle_merge_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_merge_lora<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle mergeLora request.
Sourcefn handle_create_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_create_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle createLoraStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_load_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_load_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle loadLoraStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_save_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_save_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle saveLoraStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_save_adaptation_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_save_adaptation_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle saveAdaptationStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_snapshot_delta_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_snapshot_delta_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle snapshotDeltaStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_export_peft_adapter_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_export_peft_adapter_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle exportPeftAdapterStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_merge_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_merge_lora_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle mergeLoraStream streaming request. Returns (StreamInfo, mandatory continuation).
Sourcefn handle_embed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 EmbedImagesRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_embed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 EmbedImagesRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle embed request.
Sourcefn handle_get_layer_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_get_layer_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle getLayerProfile request.
Provided Methods§
Authorize an operation on a resource. Override to enforce policy.
Called by generated dispatch functions before handler methods. Every
method carries a mandatory $scope/$capability annotation (S3, #547)
except explicit $scopeExempt methods, which are not gated here.
Default: deny all. Services MUST override to enable access.
Check if a specific resource+operation is authorized (non-failing).
Useful for filtering list results per-resource.
Default delegates to authorize().is_ok().