pub enum Language {
Lisp,
Sparql,
Plan,
}Expand description
The languages a script can be written in.
Variants§
Lisp
Steel Scheme, evaluated by ikigai-lisp at urn:lisp:eval.
Sparql
A SPARQL query or update, evaluated by the host’s store through its graph-scoped
doors (see crate::sparql). Its form, parameters and authority are read from the
parsed text.
Plan
A plan: an ik:Process graph (Turtle), validated by the host’s urn:plan:validate
and run by its urn:plan:eval (see crate::plan). Its authority is derived from
its steps’ contracts, and whether it is a read or a write from its steps’ verbs.
Implementations§
Source§impl Language
impl Language
Sourcepub fn evaluator(self) -> Option<&'static str>
pub fn evaluator(self) -> Option<&'static str>
The evaluator a Lisp run issues its sub-request to: the language is a resource, so
this crate links no interpreter. None for SPARQL, whose door is the HOST’s choice
(crate::sparql::SparqlDoor) and depends on the query’s form. A plan’s is
crate::plan::EVAL.
Sourcepub fn capability(self) -> Option<&'static str>
pub fn capability(self) -> Option<&'static str>
The capability the evaluator itself requires, which every script in the language
declares implicitly: evaluating code is itself authority, so a publisher who may not
run Lisp may not publish Lisp for others to run. None for SPARQL: a query’s
authority is the graphs it names, derived from its text (see
crate::sparql::Analysis::requires). None for a plan: its authority is what its
steps’ contracts require, derived at publish (see crate::plan::derive), and
urn:plan:eval declares none of its own.