Trait ucglib::build::assets::Cache[][src]

pub trait Cache {
    fn has_path(&self, path: &PathBuf) -> Result<bool>;
fn get(&self, path: &PathBuf) -> Result<Option<Rc<Val>>>;
fn stash(&mut self, path: PathBuf, asset: Rc<Val>) -> Result<()>; }

Defines the cach interface for a UCG build. It has functions to retrieve An asset for a referenced ucg file if it exists as well as to stash an asset for a built ucg file.

All methods with a path do path canonicalization. As a result the path is expected to exist on the filesystem. If the path does not exist on the local filesystem then the Cache may return an error.

Required Methods

Implementors