Version: dev

coupling_import

Stable type · Document types

Tier: stable · Kind: type · Topic: Document types

JuliaTypeScriptPythonRustGo
CouplingImportnot exportedCouplingImportnot exportedCouplingImport

Julia

struct CouplingImport <: CouplingEntry
CouplingImport(ref::String; ...)
CouplingImport(ref::String, bind::AbstractDict; description)
CouplingImport <: CouplingEntry

Reuse of a coupling-library file (esm-spec §10.9, §10.10). Names a library by ref and binds each of the library’s declared roles to a component in the assembly via bind (role name → a top-level models/reaction_systems key, or a dotted Parent.Child subsystem path). At flatten the import expands into concrete variable_map/couple/operator_compose/event edges by substituting the bound actual for every role-named top-level segment (expand_coupling_imports); the entry itself round-trips intact.

Source

TypeScript

TypeScript does not export this type.

Python

class CouplingImport(BaseCouplingEntry)
CouplingImport(coupling_type: CouplingType, description: str | None = None, ref: str | None = None, bind: dict[str, str] = dict())

Coupling entry that imports a coupling-library file (esm-spec §10.10).

ref is a §4.7 reference to a coupling-library file (a document with a top-level coupling_roles map); bind maps every declared role name to an assembly component (a top-level models/reaction_systems key or a dotted Parent.Child subsystem path). The entry declares no wiring of its own — at flatten (earthsci_ast.coupling_imports) it expands into concrete edges spliced in its position, while the source entry is preserved for round-trip.

Source

Rust

Rust does not export this type.

Go

type CouplingImport struct {
	Type        string            `json:"type"` // "coupling_import"
	Ref         string            `json:"ref"`
	Bind        map[string]string `json:"bind,omitempty"`
	Description *string           `json:"description,omitempty"`
}

func (c CouplingImport) CouplingType() string

CouplingImport reuses a coupling-library file (esm-spec §10.9, §10.10): it imports the library named by Ref and binds each of its declared roles to a component in the assembly via Bind (role name -> scoped component reference). At flatten (esm-spec §10.10.3) the import expands into concrete variable_map / couple / operator_compose / event edges by substituting the bound actual for every role-named top-level segment; the entry itself round-trips intact. Carries no expression_template_imports (injection is a property of the wiring entries, not of an import indirection).

Methods

func (c CouplingImport) CouplingType() string

Source · Go docs