pub trait LkEnv {
// Required method
fn userdata<'o>(&'o self, out: &mut LkEnvData<'o>);
// Provided method
fn as_scope(&self) -> LkaScope<'_> { ... }
}
Expand description
LkEnvData is a collection of pointers the user can supply to extend the available expressions when evaluating an ab-expression This LkEnvData is packed together with a set of default scopes into a LkaScope struct. LkEnv is a utility trait - allowing you to quickly change a field in the effective LkEnvData. eg lka_eval(“”, &() as &dyn UserScope); lka_eval(“[0] [1]”, &[“hello”,“world”]);