Enum naga::valid::expression::ExpressionError
source · pub enum ExpressionError {
Show 51 variants
NotInScope,
InvalidBaseType(Handle<Expression>),
InvalidIndexType(Handle<Expression>),
NegativeIndex(Handle<Expression>),
IndexOutOfBounds(Handle<Expression>, u32),
FunctionArgumentDoesntExist(u32),
InvalidPointerType(Handle<Expression>),
InvalidArrayType(Handle<Expression>),
InvalidRayQueryType(Handle<Expression>),
InvalidSplatType(Handle<Expression>),
InvalidVectorType(Handle<Expression>),
InvalidSwizzleComponent(SwizzleComponent, VectorSize),
Compose(ComposeError),
IndexableLength(IndexableLengthError),
InvalidUnaryOperandType(UnaryOperator, Handle<Expression>),
InvalidBinaryOperandTypes {
op: BinaryOperator,
lhs_expr: Handle<Expression>,
lhs_type: TypeInner,
rhs_expr: Handle<Expression>,
rhs_type: TypeInner,
},
InvalidSelectTypes,
InvalidBooleanVector(Handle<Expression>),
InvalidFloatArgument(Handle<Expression>),
Type(ResolveError),
ExpectedGlobalVariable,
ExpectedGlobalOrArgument,
ExpectedBindingArrayType(Handle<Type>),
ExpectedImageType(Handle<Type>),
ExpectedSamplerType(Handle<Type>),
InvalidImageClass(ImageClass),
InvalidDerivative,
InvalidImageArrayIndex,
InvalidImageOtherIndex,
InvalidImageArrayIndexType(Handle<Expression>),
InvalidImageOtherIndexType(Handle<Expression>),
InvalidImageCoordinateType(ImageDimension, Handle<Expression>),
ComparisonSamplingMismatch {
image: ImageClass,
sampler: bool,
has_ref: bool,
},
InvalidSampleOffsetExprType,
InvalidSampleOffset(ImageDimension, Handle<Expression>),
InvalidDepthReference(Handle<Expression>),
InvalidDepthSampleLevel,
InvalidGatherLevel,
InvalidGatherComponent(SwizzleComponent),
InvalidGatherDimension(ImageDimension),
InvalidSampleLevelExactType(Handle<Expression>),
InvalidSampleLevelBiasType(Handle<Expression>),
InvalidSampleLevelBiasDimension(ImageDimension),
InvalidSampleLevelGradientType(ImageDimension, Handle<Expression>),
InvalidCastArgument,
WrongArgumentCount(MathFunction),
InvalidArgumentType(MathFunction, u32, Handle<Expression>),
InvalidWorkGroupUniformLoadResultType(Handle<Type>),
MissingCapabilities(Capabilities),
Literal(LiteralError),
UnsupportedWidth(MathFunction, ScalarKind, Bytes),
}
Variants§
NotInScope
InvalidBaseType(Handle<Expression>)
InvalidIndexType(Handle<Expression>)
NegativeIndex(Handle<Expression>)
IndexOutOfBounds(Handle<Expression>, u32)
FunctionArgumentDoesntExist(u32)
InvalidPointerType(Handle<Expression>)
InvalidArrayType(Handle<Expression>)
InvalidRayQueryType(Handle<Expression>)
InvalidSplatType(Handle<Expression>)
InvalidVectorType(Handle<Expression>)
InvalidSwizzleComponent(SwizzleComponent, VectorSize)
Compose(ComposeError)
IndexableLength(IndexableLengthError)
InvalidUnaryOperandType(UnaryOperator, Handle<Expression>)
InvalidBinaryOperandTypes
InvalidSelectTypes
InvalidBooleanVector(Handle<Expression>)
InvalidFloatArgument(Handle<Expression>)
Type(ResolveError)
ExpectedGlobalVariable
ExpectedGlobalOrArgument
ExpectedBindingArrayType(Handle<Type>)
ExpectedImageType(Handle<Type>)
ExpectedSamplerType(Handle<Type>)
InvalidImageClass(ImageClass)
InvalidDerivative
InvalidImageArrayIndex
InvalidImageOtherIndex
InvalidImageArrayIndexType(Handle<Expression>)
InvalidImageOtherIndexType(Handle<Expression>)
InvalidImageCoordinateType(ImageDimension, Handle<Expression>)
ComparisonSamplingMismatch
InvalidSampleOffsetExprType
InvalidSampleOffset(ImageDimension, Handle<Expression>)
InvalidDepthReference(Handle<Expression>)
InvalidDepthSampleLevel
InvalidGatherLevel
InvalidGatherComponent(SwizzleComponent)
InvalidGatherDimension(ImageDimension)
InvalidSampleLevelExactType(Handle<Expression>)
InvalidSampleLevelBiasType(Handle<Expression>)
InvalidSampleLevelBiasDimension(ImageDimension)
InvalidSampleLevelGradientType(ImageDimension, Handle<Expression>)
InvalidCastArgument
WrongArgumentCount(MathFunction)
InvalidArgumentType(MathFunction, u32, Handle<Expression>)
InvalidWorkGroupUniformLoadResultType(Handle<Type>)
MissingCapabilities(Capabilities)
Literal(LiteralError)
UnsupportedWidth(MathFunction, ScalarKind, Bytes)
Trait Implementations§
source§impl Clone for ExpressionError
impl Clone for ExpressionError
source§fn clone(&self) -> ExpressionError
fn clone(&self) -> ExpressionError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExpressionError
impl Debug for ExpressionError
source§impl Display for ExpressionError
impl Display for ExpressionError
source§impl Error for ExpressionError
impl Error for ExpressionError
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()
source§impl From<ComposeError> for ExpressionError
impl From<ComposeError> for ExpressionError
source§fn from(source: ComposeError) -> Self
fn from(source: ComposeError) -> Self
Converts to this type from the input type.
source§impl From<IndexableLengthError> for ExpressionError
impl From<IndexableLengthError> for ExpressionError
source§fn from(source: IndexableLengthError) -> Self
fn from(source: IndexableLengthError) -> Self
Converts to this type from the input type.
source§impl From<LiteralError> for ExpressionError
impl From<LiteralError> for ExpressionError
source§fn from(source: LiteralError) -> Self
fn from(source: LiteralError) -> Self
Converts to this type from the input type.
source§impl From<ResolveError> for ExpressionError
impl From<ResolveError> for ExpressionError
source§fn from(source: ResolveError) -> Self
fn from(source: ResolveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExpressionError
impl RefUnwindSafe for ExpressionError
impl Send for ExpressionError
impl Sync for ExpressionError
impl Unpin for ExpressionError
impl UnwindSafe for ExpressionError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)