Enum naga::valid::ExpressionError
source · pub enum ExpressionError {
Show 53 variants
DoesntExist,
NotInScope,
InvalidBaseType(Handle<Expression>),
InvalidIndexType(Handle<Expression>),
NegativeIndex(Handle<Expression>),
IndexOutOfBounds(Handle<Expression>, u32),
IndexMustBeConstant(Handle<Expression>),
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(BinaryOperator, Handle<Expression>, Handle<Expression>),
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>),
InvalidSampleLevelGradientType(ImageDimension, Handle<Expression>),
InvalidCastArgument,
WrongArgumentCount(MathFunction),
InvalidArgumentType(MathFunction, u32, Handle<Expression>),
InvalidAtomicResultType(Handle<Type>),
InvalidWorkGroupUniformLoadResultType(Handle<Type>),
MissingCapabilities(Capabilities),
Literal(LiteralError),
UnsupportedWidth(MathFunction, ScalarKind, Bytes),
}
Variants§
DoesntExist
NotInScope
InvalidBaseType(Handle<Expression>)
InvalidIndexType(Handle<Expression>)
NegativeIndex(Handle<Expression>)
IndexOutOfBounds(Handle<Expression>, u32)
IndexMustBeConstant(Handle<Expression>)
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(BinaryOperator, Handle<Expression>, Handle<Expression>)
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>)
InvalidSampleLevelGradientType(ImageDimension, Handle<Expression>)
InvalidCastArgument
WrongArgumentCount(MathFunction)
InvalidArgumentType(MathFunction, u32, Handle<Expression>)
InvalidAtomicResultType(Handle<Type>)
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)>
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