Struct naga::Module [−][src]
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 Module::from_header
or Module::generate_empty
.
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 back ends.
Fields
header: Header
Header containing module metadata.
types: Arena<Type>
Storage for the types defined in this module.
constants: Arena<Constant>
Storage for the constants defined in this module.
global_variables: Arena<GlobalVariable>
Storage for the global variables defined in this module.
functions: Arena<Function>
Storage for the functions defined in this module.
entry_points: FastHashMap<(ShaderStage, String), EntryPoint>
Exported entry points.
Implementations
impl Module
[src]
pub fn from_header(header: Header) -> Self
[src]
pub fn generate_empty() -> Self
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Module
[src]
impl Send for Module
[src]
impl Sync for Module
[src]
impl Unpin for Module
[src]
impl UnwindSafe for Module
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,