[−][src]Trait jrsonnet_evaluator::ImportResolver
Implements file resolution logic for import
and importStr
Required methods
fn resolve_file(&self, from: &PathBuf, path: &PathBuf) -> Result<Rc<PathBuf>>
Resolves real file path, e.g. (/home/user/manifests, b.libjsonnet)
can correspond
both to /home/user/manifests/b.libjsonnet
and to /home/user/${vendor}/b.libjsonnet
where ${vendor}
is a library path.
fn load_file_contents(&self, resolved: &PathBuf) -> Result<Rc<str>>
Reads file from filesystem, should be used only with path received from resolve_file
unsafe fn as_any(&self) -> &dyn Any
Safety
For use only in bindings, should not be used elsewhere. Implementations which are not intended to be used in bindings should panic on call to this method.