Skip to main content

import_model_into_host

Function import_model_into_host 

Source
pub fn import_model_into_host(
    host: &mut AnalysisHost,
    input: &Path,
    format: Option<&str>,
    verbose: bool,
) -> Result<ImportResult, String>
Expand description

Import a model from an interchange format file (validation only).

This validates the model but doesn’t load it into a workspace. For importing into a workspace, use import_model_into_host().

Supported formats are detected from file extension:

  • .xmi - XML Model Interchange
  • .kpar - Kernel Package Archive (ZIP)
  • .jsonld, .json - JSON-LD

§Arguments

  • input - Path to the interchange file
  • format - Optional format override (otherwise detected from extension)
  • verbose - Enable verbose output

§Returns

An ImportResult with element count and symbol info.