pub enum TypeError {
Show 16 variants
MissingCapability(Capabilities),
InvalidAtomicWidth(ScalarKind, Bytes),
InvalidPointerBase(Handle<Type>),
InvalidPointerToUnsized {
base: Handle<Type>,
space: AddressSpace,
},
InvalidData(Handle<Type>),
InvalidArrayBaseType(Handle<Type>),
MatrixElementNotFloat,
UnsupportedSpecializedArrayLength(Handle<Constant>),
UnsupportedImageType {
dim: ImageDimension,
arrayed: bool,
class: ImageClass,
},
InvalidArrayStride {
stride: u32,
expected: u32,
},
InvalidDynamicArray(String, Handle<Type>),
BindingArrayBaseTypeNotStruct(Handle<Type>),
MemberOverlap {
index: u32,
offset: u32,
},
MemberOutOfBounds {
index: u32,
offset: u32,
size: u32,
span: u32,
},
EmptyStruct,
WidthError(WidthError),
}
Variants§
MissingCapability(Capabilities)
InvalidAtomicWidth(ScalarKind, Bytes)
InvalidPointerBase(Handle<Type>)
InvalidPointerToUnsized
InvalidData(Handle<Type>)
InvalidArrayBaseType(Handle<Type>)
MatrixElementNotFloat
UnsupportedSpecializedArrayLength(Handle<Constant>)
UnsupportedImageType
InvalidArrayStride
InvalidDynamicArray(String, Handle<Type>)
BindingArrayBaseTypeNotStruct(Handle<Type>)
MemberOverlap
MemberOutOfBounds
EmptyStruct
WidthError(WidthError)
Trait Implementations§
Source§impl Error for TypeError
impl Error for TypeError
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<WidthError> for TypeError
impl From<WidthError> for TypeError
Source§fn from(source: WidthError) -> Self
fn from(source: WidthError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TypeError
impl RefUnwindSafe for TypeError
impl Send for TypeError
impl Sync for TypeError
impl Unpin for TypeError
impl UnwindSafe for TypeError
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
)