pub trait ModelFamilyRegistration: Send + Sync {
// Required methods
fn family_id(&self) -> &ModelFamilyId;
fn external_metadata_ids(&self) -> BTreeSet<ExternalModelMetadataId>;
fn define(
&self,
raw_config: &Value,
) -> Result<ModelFamilyDefinition, VNextError>;
fn prepare(
&self,
definition: &ModelFamilyDefinition,
profile: &NumericalProfileId,
) -> Result<PreparedModelFamily, VNextError>;
// Provided method
fn prepare_with_profile(
&self,
raw_config: &Value,
profile: &NumericalProfileId,
) -> Result<PreparedModelFamily, VNextError> { ... }
}Expand description
Object-safe loading-time trampoline for a heterogeneous family catalog. The raw JSON exists only at the configuration boundary; a typed provider validates it before producing the backend-free package.
Required Methods§
fn family_id(&self) -> &ModelFamilyId
fn external_metadata_ids(&self) -> BTreeSet<ExternalModelMetadataId>
fn define( &self, raw_config: &Value, ) -> Result<ModelFamilyDefinition, VNextError>
fn prepare( &self, definition: &ModelFamilyDefinition, profile: &NumericalProfileId, ) -> Result<PreparedModelFamily, VNextError>
Provided Methods§
fn prepare_with_profile( &self, raw_config: &Value, profile: &NumericalProfileId, ) -> Result<PreparedModelFamily, VNextError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".