pub trait ContextInitializer: Trace {
    fn initialize(&self, state: State, for_file: Source) -> Context;
    fn as_any(&self) -> &dyn Any;
}
Expand description

During import, this trait will be called to create initial context for file. It may initialize global variables, stdlib for example.

Required Methods§

Initialize default file context.

Allows upcasting from abstract to concrete context initializer. jrsonnet by itself doesn’t use this method, it is allowed for it to panic.

Implementors§