pub struct ModelService { /* private fields */ }Expand description
Model service that manages InferenceService lifecycle.
Wraps ModelServiceInner in Arc so continuations can capture a cheap
clone. All field access is transparent via Deref.
Load requests are handled asynchronously: the request loop returns an
immediate “accepted” response and spawns the actual model loading as a
Continuation (via spawn_local), keeping the service responsive for
list, health, info, and other requests during long GPU weight transfers.
Implementations§
Source§impl ModelService
impl ModelService
Sourcepub async fn new(
config: ModelServiceConfig,
signing_key: SigningKey,
policy_client: PolicyClient,
registry: RegistryClient,
transport: TransportConfig,
policy_transport: TransportConfig,
) -> Result<Self>
pub async fn new( config: ModelServiceConfig, signing_key: SigningKey, policy_client: PolicyClient, registry: RegistryClient, transport: TransportConfig, policy_transport: TransportConfig, ) -> Result<Self>
Create a new model service with infrastructure
Sourcepub fn with_expected_audience(self, audience: String) -> Self
pub fn with_expected_audience(self, audience: String) -> Self
Set the expected JWT audience for token validation.
§Panics
Panics if called after the service has been cloned (Arc refcount > 1). Must be called during construction, before the service is shared.
Sourcepub fn with_delegated_resource_audiences(self, oai: String, mcp: String) -> Self
pub fn with_delegated_resource_audiences(self, oai: String, mcp: String) -> Self
Admit only current OAI/MCP service keys for the configured HTTP resources. Without this factory configuration external resource tokens stay denied.
Sourcepub fn with_jwt_key_source(self, src: Arc<dyn JwtKeySource>) -> Self
pub fn with_jwt_key_source(self, src: Arc<dyn JwtKeySource>) -> Self
Set the unified JWT key source for verifying JWTs.
§Panics
Panics if called after the service has been cloned (Arc refcount > 1).
Sourcepub fn with_discovery_client(self, client: Arc<DiscoveryClient>) -> Self
pub fn with_discovery_client(self, client: Arc<DiscoveryClient>) -> Self
Set the DiscoveryClient for federated at:// record resolution (#431).
§Panics
Panics if called after the service has been cloned (Arc refcount > 1).
Trait Implementations§
Source§impl AdapterHandler for ModelService
impl AdapterHandler for ModelService
Source§fn handle_load<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
value: &'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 handle_load<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
value: &'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,
Source§fn handle_unload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_unload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_inspect<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AdapterInfo>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_inspect<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AdapterInfo>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_merge<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 MergeLoraRequest,
) -> 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 handle_merge<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§impl Clone for ModelService
impl Clone for ModelService
Source§impl Deref for ModelService
impl Deref for ModelService
Source§impl FsHandler for ModelService
impl FsHandler for ModelService
Source§fn handle_walk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpWalk,
) -> Pin<Box<dyn Future<Output = Result<RWalk>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_walk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpWalk,
) -> Pin<Box<dyn Future<Output = Result<RWalk>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_open<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpOpen,
) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_open<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpOpen,
) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpRead,
) -> Pin<Box<dyn Future<Output = Result<RRead>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpRead,
) -> Pin<Box<dyn Future<Output = Result<RRead>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_write<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpWrite,
) -> Pin<Box<dyn Future<Output = Result<RWrite>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_write<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpWrite,
) -> Pin<Box<dyn Future<Output = Result<RWrite>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_clunk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpClunk,
) -> 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 handle_clunk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpClunk,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_stat<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpStatReq,
) -> Pin<Box<dyn Future<Output = Result<RStat>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_stat<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
data: &'life3 NpStatReq,
) -> Pin<Box<dyn Future<Output = Result<RStat>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
_data: &'life3 NpCreate,
) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
_data: &'life3 NpCreate,
) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_remove<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
_data: &'life3 NpRemove,
) -> 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 handle_remove<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
_model_ref: &'life2 str,
_data: &'life3 NpRemove,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§impl InferHandler for ModelService
impl InferHandler for ModelService
Source§fn handle_generate_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 GenerationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_generate_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 GenerationRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_apply_chat_template<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 ChatTemplateRequest,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_apply_chat_template<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 ChatTemplateRequest,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_embed<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 EmbedImagesRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbedImagesResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_embed<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 EmbedImagesRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbedImagesResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ModelStatusResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ModelStatusResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl ModelHandler for ModelService
impl ModelHandler for ModelService
Source§fn handle_load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 LoadModelRequest,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 LoadModelRequest,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
load request.Source§fn handle_unload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 UnloadModelRequest,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_unload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 UnloadModelRequest,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
unload request.Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 StatusRequest,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 StatusRequest,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
status request.Source§fn handle_health_check<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<ModelResponseVariant>> + '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<ModelResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
healthCheck request.Source§impl RequestService for ModelService
impl RequestService for ModelService
Source§fn accept_deferred_federate_credential(&self) -> bool
fn accept_deferred_federate_credential(&self) -> bool
Source§fn admit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
proof: &'life3 ParsedProof,
) -> Pin<Box<dyn Future<Output = Result<(VerifiedProof, [u8; 32], String, String, ProofReplayKey, u64)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn admit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
proof: &'life3 ParsedProof,
) -> Pin<Box<dyn Future<Output = Result<(VerifiedProof, [u8; 32], String, String, ProofReplayKey, u64)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
commit_deferred_federate_request only after those gates pass.Source§fn commit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
replay_key: &'life4 ProofReplayKey,
replay_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn commit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
resource: &'life2 str,
operation: &'life3 str,
replay_key: &'life4 ProofReplayKey,
replay_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn decode_request_body(&self, signed_body: &[u8]) -> Result<DecodedRequestBody>
fn decode_request_body(&self, signed_body: &[u8]) -> Result<DecodedRequestBody>
Source§fn handle_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, Option<Continuation>)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, Option<Continuation>)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn transport(&self) -> &TransportConfig
fn transport(&self) -> &TransportConfig
Source§fn signing_key(&self) -> SigningKey
fn signing_key(&self) -> SigningKey
Source§fn expected_audience(&self) -> Option<&str>
fn expected_audience(&self) -> Option<&str>
Source§fn accept_delegated_bearer(&self, signer: &[u8; 32]) -> bool
fn accept_delegated_bearer(&self, signer: &[u8; 32]) -> bool
Source§fn delegated_user_audience(
&self,
signer: &[u8; 32],
untrusted_aud: Option<&str>,
) -> Option<&str>
fn delegated_user_audience( &self, signer: &[u8; 32], untrusted_aud: Option<&str>, ) -> Option<&str>
expected_audience instead.Source§fn accept_delegated_resource_leaf(
&self,
ctx: &EnvelopeContext,
body: &DecodedRequestBody,
) -> bool
fn accept_delegated_resource_leaf( &self, ctx: &EnvelopeContext, body: &DecodedRequestBody, ) -> bool
Source§fn jwt_key_source(&self) -> Option<Arc<dyn JwtKeySource>>
fn jwt_key_source(&self) -> Option<Arc<dyn JwtKeySource>>
Source§fn producer_reach_config_handle(&self) -> Option<ProducerReachConfigHandle>
fn producer_reach_config_handle(&self) -> Option<ProducerReachConfigHandle>
Source§fn moq_origin_handle(&self) -> Option<MoqStreamOriginHandle>
fn moq_origin_handle(&self) -> Option<MoqStreamOriginHandle>
Source§fn build_error_payload(&self, request_id: u64, error: &str) -> Vec<u8> ⓘ
fn build_error_payload(&self, request_id: u64, error: &str) -> Vec<u8> ⓘ
Source§fn pq_signing_key(&self) -> Option<SigningKey<MlDsa65>>
fn pq_signing_key(&self) -> Option<SigningKey<MlDsa65>>
None makes process_request fail closed
before dispatch; it never selects an EdDSA-only response. The matching ML-DSA-65 public key
must be anchored in the client’s PQ trust store for Hybrid verification
to succeed (peer attestation). Read moreSource§fn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
Source§fn require_cnf_binding(&self) -> bool
fn require_cnf_binding(&self) -> bool
cnf key binding (jwk or jkt). Read moreSource§fn credential_revocation_store(&self) -> Option<&dyn CredentialRevocationStore>
fn credential_revocation_store(&self) -> Option<&dyn CredentialRevocationStore>
Source§fn jwt_verify_policy(&self) -> CryptoPolicy
fn jwt_verify_policy(&self) -> CryptoPolicy
Source§fn resolve_key_subject(&self, signer_pubkey: &[u8; 32]) -> Option<Subject>
fn resolve_key_subject(&self, signer_pubkey: &[u8; 32]) -> Option<Subject>
Source§fn cache_key_binding(
&self,
_verifying_key: VerifyingKey,
_subject: &str,
_jwt: &str,
_expires_at: i64,
)
fn cache_key_binding( &self, _verifying_key: VerifyingKey, _subject: &str, _jwt: &str, _expires_at: i64, )
Source§fn verify_internal_work_bearer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_token: &'life2 str,
_protected: &'life3 ProtectedHeader,
) -> Pin<Box<dyn Future<Output = Result<InternalWorkClaims, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn verify_internal_work_bearer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_token: &'life2 str,
_protected: &'life3 ProtectedHeader,
) -> Pin<Box<dyn Future<Output = Result<InternalWorkClaims, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
iw+jwt internal execution work order presented as the
direct JWT (single-service Model→Inference boundary, user-approved D5). Read moreSource§impl TttHandler for ModelService
impl TttHandler for ModelService
Source§fn handle_init<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 LoraConfig,
) -> 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 handle_init<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_train<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<TrainStepResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_train<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<TrainStepResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_train_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_train_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_writeback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_writeback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_evict<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_evict<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_zero<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_zero<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DeltaStatusResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DeltaStatusResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_save<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<SaveAdaptationResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_save<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<SaveAdaptationResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SnapshotDeltaResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SnapshotDeltaResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_export<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<ExportPeftResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_export<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<ExportPeftResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn handle_write_ttt_config<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 WriteTttConfigRequest,
) -> 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 handle_write_ttt_config<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
model_ref: &'life2 str,
data: &'life3 WriteTttConfigRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Auto Trait Implementations§
impl Freeze for ModelService
impl !RefUnwindSafe for ModelService
impl Send for ModelService
impl Sync for ModelService
impl Unpin for ModelService
impl UnsafeUnpin for ModelService
impl !UnwindSafe for ModelService
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request