pub struct CwlDb;Expand description
Handle to the lower-precision CWL tier: a broad set of command/environment
names plus argument shapes harvested from the TeXstudio CWL corpus (a curated
package subset; see scripts/gen_cwl_signatures.py). It carries names and
arity only — every behavior flag (content/verbatim/sectioning/math/…) is
left at its default — so it can widen completion and the formatter’s arity
lookup without its low-confidence data ever reaching a lexer/outline behavior
decision. Consulted strictly under builtin (via Signatures); the
curated tier always wins. A ZST over the generated phf statics, so its query
methods mirror SignatureDb’s without owning a heap map.
Implementations§
Source§impl CwlDb
impl CwlDb
Sourcepub fn command(&self, name: &str) -> Option<&'static CommandSig>
pub fn command(&self, name: &str) -> Option<&'static CommandSig>
The signature of command name (without the leading \), if in the tier.
Sourcepub fn environment(&self, name: &str) -> Option<&'static EnvironmentSig>
pub fn environment(&self, name: &str) -> Option<&'static EnvironmentSig>
The signature of environment name, if in the tier.
Sourcepub fn command_names(&self) -> impl Iterator<Item = &str>
pub fn command_names(&self) -> impl Iterator<Item = &str>
All CWL command names (without the leading \), in arbitrary order. The
&str lifetime is tied to &self (not 'static) so it unifies with the
borrowed scanned-definition names in a completion chain (see
completion::command_candidates), exactly like SignatureDb::command_names.
Sourcepub fn environment_names(&self) -> impl Iterator<Item = &str>
pub fn environment_names(&self) -> impl Iterator<Item = &str>
All CWL environment names, in arbitrary order. See command_names.
Sourcepub fn command_sigs(&self) -> impl Iterator<Item = &'static CommandSig>
pub fn command_sigs(&self) -> impl Iterator<Item = &'static CommandSig>
All CWL command signatures (introspection; backs the invariant tests).
Sourcepub fn environment_sigs(&self) -> impl Iterator<Item = &'static EnvironmentSig>
pub fn environment_sigs(&self) -> impl Iterator<Item = &'static EnvironmentSig>
All CWL environment signatures (introspection; backs the invariant tests).