pub trait SchemaRegistry:
Send
+ Sync
+ Debug {
// Required methods
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
schema_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CompileError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn register<'life0, 'life1, 'async_trait>(
&'life0 self,
schema_id: &'life1 str,
schema: Value,
) -> Pin<Box<dyn Future<Output = Result<(), CompileError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CompileError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Schema resolution abstraction.
Stage 02 (A2UI) uses this to validate and resolve schema references.
The InMemorySchemaRegistry validates structure locally; future
implementations can resolve external URIs.
Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
schema_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CompileError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
schema_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CompileError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve a schema by ID. Returns None if not found.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".