Trait ocl_include::source::Source[][src]

pub trait Source {
    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)>[src]

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...

Implementations on Foreign Types

impl<S: Source> Source for Vec<S>[src]

Vector of sources is also source.

impl<'a, S: Source> Source for &'a S[src]

Source reference is also source.

impl Source for Box<dyn Source>[src]

Source Box is also source.

impl<S: Source> Source for Rc<S>[src]

Source Rc is also source.

Loading content...

Implementors

impl Source for Fs[src]

impl Source for Mem[src]

Loading content...