pub trait FromCompilation<T> {
    type Target: OutputTarget;
    type Options;
    type Context;
    type Output: CompileShader<Self::Target, Context = Self::Context, Options = Self::Options> + ReflectShader;

    // Required method
    fn from_compilation(
        compile: T
    ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>;
}
Expand description

A trait for reflectable compilations that can be transformed into an object ready for reflection or compilation.

Required Associated Types§

source

type Target: OutputTarget

The target that the transformed object is expected to compile for.

source

type Options

Options provided to the compiler.

source

type Context

Additional context returned by the compiler after compilation.

source

type Output: CompileShader<Self::Target, Context = Self::Context, Options = Self::Options> + ReflectShader

The output type after conversion.

Required Methods§

source

fn from_compilation( compile: T ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>

Tries to convert the input object into an object ready for compilation.

Implementors§