pub struct CjsComponent {
pub iri: String,
pub component_type: ComponentType,
pub require_element: Option<String>,
pub comment: Option<String>,
pub parameters: Vec<CjsParameter>,
pub extends: Vec<String>,
pub constructor_arguments: Option<JsonLdVal>,
pub module_iri: Option<String>,
pub source_file: String,
pub iri_span: Range<usize>,
}Expand description
A CJS component — a class, abstract class, or singleton instance declared inside a module.
Returned by [ComponentRegistry] and used for:
- Autocompletion of
@typevalues in config files (all variants) - Hover documentation —
commentprovides the description - Goto-definition —
source_file+iri_spanpoints to the@idin the file where this component is defined (may differ from the module’s entry-point file when components are split across imported sub-files) - Parameter completion —
parametersdrives key completion inside config instance objects
Fields§
§iri: StringFully expanded IRI identifying this component.
component_type: ComponentType§require_element: Option<String>The JavaScript export name to require (from oo:componentPath).
comment: Option<String>Human-readable description from rdfs:comment — shown in hover cards.
parameters: Vec<CjsParameter>Constructor parameters for this component (own + inherited via finalize).
extends: Vec<String>IRIs of parent classes (from rdfs:subClassOf). Populated so the LSP
can show the full inheritance chain and resolve inherited parameters.
constructor_arguments: Option<JsonLdVal>Raw constructor arguments descriptor (kept for completeness).
module_iri: Option<String>IRI of the module that declares this component.
source_file: StringAbsolute path to the file where this component’s @id is defined.
This is the correct target for goto-definition; it may differ from
CjsModule::source_file when the module imports component sub-files.
iri_span: Range<usize>Byte range of the @id value for this component in source_file.
Trait Implementations§
Source§impl Clone for CjsComponent
impl Clone for CjsComponent
Source§fn clone(&self) -> CjsComponent
fn clone(&self) -> CjsComponent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more