Trait librashader_reflect::back::FromCompilation
source · pub trait FromCompilation<T, S> {
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.
T is the compiled reflectable form of the shader.
S is the semantics under which the shader is reflected.
librashader currently supports two semantics, SpirvCross
Required Associated Types§
sourcetype Target: OutputTarget
type Target: OutputTarget
The target that the transformed object is expected to compile for.
sourcetype Output: CompileShader<Self::Target, Context = Self::Context, Options = Self::Options> + ReflectShader
type Output: CompileShader<Self::Target, Context = Self::Context, Options = Self::Options> + ReflectShader
The output type after conversion.
Required Methods§
sourcefn from_compilation(
compile: T
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: T ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Object Safety§
This trait is not object safe.