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
sourceimpl<'arbitrary> Arbitrary<'arbitrary> for Module
impl<'arbitrary> Arbitrary<'arbitrary> for Module
sourcefn 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 moresourcefn 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 moresourceimpl<'de> Deserialize<'de> for Module
impl<'de> Deserialize<'de> for Module
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more