[][src]Trait ocl_include::Hook

pub trait Hook {
    fn read(&self, path: &Path, dir: Option<&Path>) -> Result<(PathBuf, String)>;
}

Something that may provide file content by its name

Required methods

fn read(&self, path: &Path, dir: Option<&Path>) -> Result<(PathBuf, String)>

Performs file loading

Arguments: + path: absolute or relative file path, + dir: directory of parent file if it contains relative include directive

Returns on success: + Absolute path to file + File content

Loading content...

Implementors

impl Hook for FsHook[src]

impl Hook for ListHook[src]

impl Hook for MemHook[src]

Loading content...