intuicio_core::script

Trait ScriptContentProvider

Source
pub trait ScriptContentProvider<T> {
    // Required methods
    fn load(&mut self, path: &str) -> Result<Option<T>, Box<dyn Error>>;
    fn join_paths(
        &self,
        parent: &str,
        relative: &str,
    ) -> Result<String, Box<dyn Error>>;

    // Provided methods
    fn unpack_load(
        &mut self,
        path: &str,
    ) -> Result<Vec<ScriptContent<T>>, Box<dyn Error>> { ... }
    fn sanitize_path(&self, path: &str) -> Result<String, Box<dyn Error>> { ... }
}

Required Methods§

Source

fn load(&mut self, path: &str) -> Result<Option<T>, Box<dyn Error>>

Source

fn join_paths( &self, parent: &str, relative: &str, ) -> Result<String, Box<dyn Error>>

Provided Methods§

Source

fn unpack_load( &mut self, path: &str, ) -> Result<Vec<ScriptContent<T>>, Box<dyn Error>>

Source

fn sanitize_path(&self, path: &str) -> Result<String, Box<dyn Error>>

Implementors§