pub struct CatalogEntry {
pub id: String,
pub kind: Kind,
pub params: Vec<String>,
pub param_domains: Vec<Option<String>>,
pub param_defaults: Vec<Option<String>>,
pub param_types: Vec<Option<String>>,
pub return_type: Option<String>,
pub variadic: bool,
/* private fields */
}Expand description
One catalog builtin.
Fields§
§id: String§kind: Kind§params: Vec<String>Parameter names, when the catalog documents them.
param_domains: Vec<Option<String>>The canonical enum domain expected at each parameter position, when
the parameter takes an enumerated value (parallel to params).
None for non-enum parameters and for parameters whose accepted
values span multiple canonical domains. In particular, a filtered
rule event’s Player parameter accepts EventPlayer members or
canonical Hero members; the WIR crate::wir::EventTarget carries
that union explicitly.
param_defaults: Vec<Option<String>>Default value per parameter position (parallel to params),
resolved when a call omits the argument. See the catalog data
provenance for the value syntax and evidence.
param_types: Vec<Option<String>>Evidence-backed semantic type per parameter position. None means
the available sources do not prove a narrower type.
return_type: Option<String>Evidence-backed return type for Value entries. Actions must leave this unset; an absent value is intentionally evidence-insufficient.
variadic: boolWhether the final declared parameter repeats for additional arguments.
Implementations§
Source§impl CatalogEntry
impl CatalogEntry
Sourcepub fn spelling(&self, locale: &Locale) -> Option<&str>
pub fn spelling(&self, locale: &Locale) -> Option<&str>
The localized spelling of this builtin in locale, when declared.
Sourcepub fn spellings(&self, locale: &Locale) -> &[String]
pub fn spellings(&self, locale: &Locale) -> &[String]
Every reviewed localized spelling of this builtin, with the first spelling reserved for deterministic emission.
Sourcepub fn param_count(&self) -> usize
pub fn param_count(&self) -> usize
The number of declared arguments for this builtin.
Sourcepub fn required_param_count(&self) -> usize
pub fn required_param_count(&self) -> usize
The number of arguments that must be present when trailing defaults are applied. A missing default in the middle of a signature remains a required position; defaults only make the suffix optional.
Sourcepub fn param_domain(&self, index: usize) -> Option<&str>
pub fn param_domain(&self, index: usize) -> Option<&str>
The declared enum domain for an argument position, when one exists.
Sourcepub fn param_type(&self, index: usize) -> Option<&str>
pub fn param_type(&self, index: usize) -> Option<&str>
The evidence-backed semantic type for an argument position, when
available. Enum domains remain exposed separately by param_domain.
Sourcepub fn return_type(&self) -> Option<&str>
pub fn return_type(&self) -> Option<&str>
The evidence-backed return type of a Value, when available.
Trait Implementations§
Source§impl Clone for CatalogEntry
impl Clone for CatalogEntry
Source§fn clone(&self) -> CatalogEntry
fn clone(&self) -> CatalogEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more