Skip to main content

Crate types_registry_sdk

Crate types_registry_sdk 

Source
Expand description

Types Registry SDK

This crate provides the public API for the types-registry module:

  • TypesRegistryClient trait for inter-module communication
  • GtsTypeSchema / GtsInstance typed entity models
  • TypeSchemaQuery / InstanceQuery for filtering
  • GtsTypeId / GtsInstanceId typed identifiers
  • TypesRegistryError for error handling

§Usage

Consumers obtain the client from ClientHub:

use types_registry_sdk::{TypeSchemaQuery, TypesRegistryClient};

let client = hub.get::<dyn TypesRegistryClient>()?;

let schema = client.get_type_schema("gts.acme.core.events.user.v1~").await?;
let schemas = client
    .list_type_schemas(TypeSchemaQuery::default().with_pattern("gts.acme.*"))
    .await?;

Re-exports§

pub use api::TypesRegistryClient;
pub use error::TypesRegistryError;
pub use models::GtsInstance;
pub use models::GtsTypeId;
pub use models::GtsTypeSchema;
pub use models::InstanceQuery;
pub use models::RegisterResult;
pub use models::RegisterSummary;
pub use models::TypeSchemaQuery;
pub use models::is_type_schema_id;

Modules§

api
TypesRegistryClient trait definition.
error
Public error types for the types-registry module.
models
Public models for the types-registry module.

Structs§

GtsInstanceId
A type-safe wrapper for GTS instance identifiers.