#[non_exhaustive]pub enum CreateModuleError {
NonConsecutiveBindGroups,
DuplicateBinding {
binding: u32,
},
ParseError {
error: ParseError,
},
ValidationError {
error: WithSpan<ValidationError>,
},
}
Expand description
Errors while generating Rust source for a WGSL shader module.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NonConsecutiveBindGroups
Bind group sets must be consecutive and start from 0.
See bind_group_layouts
for
PipelineLayoutDescriptor.
DuplicateBinding
Each binding resource must be associated with exactly one binding index.
ParseError
The shader source could not be parsed.
Fields
§
error: ParseError
ValidationError
The shader source could not be validated.
Fields
§
error: WithSpan<ValidationError>
Implementations§
Source§impl CreateModuleError
impl CreateModuleError
Sourcepub fn emit_to_stderr(&self, wgsl_source: &str)
pub fn emit_to_stderr(&self, wgsl_source: &str)
Writes a diagnostic error to stderr.
Sourcepub fn emit_to_stderr_with_path(
&self,
wgsl_source: &str,
path: impl AsRef<Path>,
)
pub fn emit_to_stderr_with_path( &self, wgsl_source: &str, path: impl AsRef<Path>, )
Writes a diagnostic error to stderr, including a source path.
Sourcepub fn emit_to_string(&self, wgsl_source: &str) -> String
pub fn emit_to_string(&self, wgsl_source: &str) -> String
Creates a diagnostic string from the error.
Trait Implementations§
Source§impl Debug for CreateModuleError
impl Debug for CreateModuleError
Source§impl Display for CreateModuleError
impl Display for CreateModuleError
Source§impl Error for CreateModuleError
impl Error for CreateModuleError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CreateModuleError
impl RefUnwindSafe for CreateModuleError
impl Send for CreateModuleError
impl Sync for CreateModuleError
impl Unpin for CreateModuleError
impl UnwindSafe for CreateModuleError
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