Enum naga::back::FunctionType
source · pub enum FunctionType {
Function(Handle<Function>),
EntryPoint(EntryPointIndex),
}
Expand description
Whether we’re generating an entry point or a regular function.
Backend languages often require different code for a Function
depending on whether it represents an EntryPoint
or not.
Backends can pass common code one of these values to select the
right behavior.
These values also carry enough information to find the Function
in the Module
: the Handle
for a regular function, or the
index into Module::entry_points
for an entry point.
Variants§
Function(Handle<Function>)
A regular function.
EntryPoint(EntryPointIndex)
An EntryPoint
, and its index in Module::entry_points
.
Implementations§
source§impl FunctionType
impl FunctionType
sourcepub fn is_compute_entry_point(&self, module: &Module) -> bool
pub fn is_compute_entry_point(&self, module: &Module) -> bool
Returns true if the function is an entry point for a compute shader.
Auto Trait Implementations§
impl RefUnwindSafe for FunctionType
impl Send for FunctionType
impl Sync for FunctionType
impl Unpin for FunctionType
impl UnwindSafe for FunctionType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more