pub struct Module {
pub types: UniqueArena<Type>,
pub constants: Arena<Constant>,
pub global_variables: Arena<GlobalVariable>,
pub functions: Arena<Function>,
pub entry_points: Vec<EntryPoint>,
}
Expand description
Shader module.
A module is a set of constants, global variables and functions, as well as the types required to define them.
Some functions are marked as entry points, to be used in a certain shader stage.
To create a new module, use the Default
implementation.
Alternatively, you can load an existing shader using one of the available front ends.
When finished, you can export modules using one of the available backends.
Fields§
§types: UniqueArena<Type>
Arena for the types defined in this module.
constants: Arena<Constant>
Arena for the constants defined in this module.
global_variables: Arena<GlobalVariable>
Arena for the global variables defined in this module.
functions: Arena<Function>
Arena for the functions defined in this module.
Each function must appear in this arena strictly before all its callers. Recursion is not supported.
entry_points: Vec<EntryPoint>
Entry points.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for Module
impl<'arbitrary> Arbitrary<'arbitrary> for Module
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl<'de> Deserialize<'de> for Module
impl<'de> Deserialize<'de> for Module
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more