Trait glsl_lang_lexer::v2_full::fs::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

Object Safety§

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§