Skip to main content

InferenceHandler

Trait InferenceHandler 

Source
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§

Source

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).

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

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.

Source

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.

Source

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).

Source

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).

Source

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).

Source

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).

Source

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).

Source

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).

Source

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).

Source

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.

Source

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§

Source

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,

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.

Source

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,

Check if a specific resource+operation is authorized (non-failing).

Useful for filtering list results per-resource. Default delegates to authorize().is_ok().

Implementors§