pub trait ComposingHost: Send + Sync {
// Required method
fn compose<'life0, 'life1, 'async_trait>(
&'life0 self,
providers: Vec<Box<dyn ContextProvider>>,
query: &'life1 ContextQuery,
) -> Pin<Box<dyn Future<Output = Composition> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A host’s composition layer, as this suite needs to see it.
One method, because one method is the whole contract: a composing host is a
function from (providers, query) to what reached the prompt. Taking the
providers rather than a pre-built fan-out is deliberate — it lets the suite
hand over adversarial providers and still exercise the host’s own fan-out
and audit path, which is where CCHECK_QUARANTINE lives. A trait that took
an already-audited frame list could not tell whether the host ran the audit.
Required Methods§
Sourcefn compose<'life0, 'life1, 'async_trait>(
&'life0 self,
providers: Vec<Box<dyn ContextProvider>>,
query: &'life1 ContextQuery,
) -> Pin<Box<dyn Future<Output = Composition> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compose<'life0, 'life1, 'async_trait>(
&'life0 self,
providers: Vec<Box<dyn ContextProvider>>,
query: &'life1 ContextQuery,
) -> Pin<Box<dyn Future<Output = Composition> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register exactly providers, execute query, and report the result.
Implementations should build a fresh host per call: the suite relies on calls being independent, and reuses ids across checks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".