Trait PreprocessorExt

Source
pub trait PreprocessorExt<F: FileSystem> {
    // Required methods
    fn open(
        &mut self,
        path: impl AsRef<Path>,
    ) -> Result<File<'_, '_, F>, F::Error>;
    fn open_source(
        &mut self,
        source: &str,
        path: impl AsRef<Path>,
    ) -> File<'_, '_, F>;
}
Expand description

glsl-lang-pp preprocessor extensions

Required Methods§

Source

fn open(&mut self, path: impl AsRef<Path>) -> Result<File<'_, '_, F>, F::Error>

Open the given file for lexing

§Parameters
  • path: path to the file to open
Source

fn open_source( &mut self, source: &str, path: impl AsRef<Path>, ) -> File<'_, '_, F>

Open the given source block for lexing

§Parameters
  • source: source string to parse
  • path: path to the directory that contains this source

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<F: FileSystem> PreprocessorExt<F> for Processor<F>

Source§

fn open(&mut self, path: impl AsRef<Path>) -> Result<File<'_, '_, F>, F::Error>

Source§

fn open_source( &mut self, source: &str, path: impl AsRef<Path>, ) -> File<'_, '_, F>

Implementors§