pub struct CjsParameter {
pub iri: String,
pub range: Option<String>,
pub comment: Option<String>,
pub required: bool,
pub lazy: bool,
pub unique: bool,
pub default_value: Option<JsonLdVal>,
pub source_file: String,
pub iri_span: Range<usize>,
}Expand description
A single named parameter on a CJS component.
Used for:
- Key completion inside config instance objects (the parameter IRI, compacted via the active context, is the JSON key)
- Type-aware value completion —
rangerestricts accepted value types - Goto-definition on a config parameter key —
source_file+iri_spanpoint to the@idin the component definition file
Fields§
§iri: StringFully expanded parameter IRI (the JSON key in a config file after expansion).
range: Option<String>Accepted value type IRI (from rdfs:range), e.g. xsd:string.
comment: Option<String>Human-readable description from rdfs:comment.
required: boolWhether this parameter must be provided in every config instance.
lazy: boolWhether the value is lazily resolved at runtime.
unique: boolWhether only a single value is allowed (no array).
default_value: Option<JsonLdVal>Default value used when the parameter is omitted.
source_file: StringAbsolute path to the file where this parameter’s @id is defined.
iri_span: Range<usize>Byte range of the @id value for this parameter in source_file.
Trait Implementations§
Source§impl Clone for CjsParameter
impl Clone for CjsParameter
Source§fn clone(&self) -> CjsParameter
fn clone(&self) -> CjsParameter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CjsParameter
impl RefUnwindSafe for CjsParameter
impl Send for CjsParameter
impl Sync for CjsParameter
impl Unpin for CjsParameter
impl UnsafeUnpin for CjsParameter
impl UnwindSafe for CjsParameter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more