#[non_exhaustive]pub enum TransferError {
Show 38 variants
SameSourceDestinationBuffer,
MissingBufferUsage(MissingBufferUsageError),
MissingTextureUsage(MissingTextureUsageError),
BufferStartOffsetOverrun {
start_offset: BufferAddress,
buffer_size: BufferAddress,
side: CopySide,
},
BufferEndOffsetOverrun {
start_offset: BufferAddress,
size: BufferAddress,
buffer_size: BufferAddress,
side: CopySide,
},
TextureOverrun {
start_offset: u32,
end_offset: u32,
texture_size: u32,
dimension: TextureErrorDimension,
side: CopySide,
},
UnsupportedPartialTransfer {
format: TextureFormat,
sample_count: u32,
start_offset: u32,
end_offset: u32,
texture_size: u32,
dimension: TextureErrorDimension,
side: CopySide,
},
InvalidCopyWithinSameTexture {
src_aspects: TextureAspect,
dst_aspects: TextureAspect,
src_origin_z: u32,
dst_origin_z: u32,
array_layer_count: u32,
},
InvalidTextureAspect {
format: TextureFormat,
aspect: TextureAspect,
},
InvalidTextureMipLevel {
level: u32,
total: u32,
},
InvalidDimensionExternal,
UnalignedBufferOffset(BufferAddress),
UnalignedCopySize(BufferAddress),
UnalignedCopyWidth,
UnalignedCopyHeight,
UnalignedCopyOriginX,
UnalignedCopyOriginY,
UnalignedBytesPerRow,
UnspecifiedBytesPerRow,
UnspecifiedRowsPerImage,
InvalidBytesPerRow,
InvalidRowsPerImage,
SizeOverflow,
CopySrcMissingAspects,
CopyDstMissingAspects,
CopyAspectNotOne,
CopyFromForbiddenTextureFormat(TextureFormat),
CopyFromForbiddenTextureFormatAspect {
format: TextureFormat,
aspect: TextureAspect,
},
CopyToForbiddenTextureFormat(TextureFormat),
CopyToForbiddenTextureFormatAspect {
format: TextureFormat,
aspect: TextureAspect,
},
ExternalCopyToForbiddenTextureFormat(TextureFormat),
TextureFormatsNotCopyCompatible {
src_format: TextureFormat,
dst_format: TextureFormat,
},
MemoryInitFailure(ClearError),
MissingDownlevelFlags(MissingDownlevelFlags),
InvalidSampleCount {
sample_count: u32,
},
SampleCountNotEqual {
src_sample_count: u32,
dst_sample_count: u32,
},
InvalidMipLevel {
requested: u32,
count: u32,
},
BufferNotAvailable,
}Expand description
Error encountered while attempting a data transfer.
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.
SameSourceDestinationBuffer
MissingBufferUsage(MissingBufferUsageError)
MissingTextureUsage(MissingTextureUsageError)
BufferStartOffsetOverrun
BufferEndOffsetOverrun
TextureOverrun
Fields
§
dimension: TextureErrorDimensionUnsupportedPartialTransfer
InvalidCopyWithinSameTexture
InvalidTextureAspect
InvalidTextureMipLevel
InvalidDimensionExternal
UnalignedBufferOffset(BufferAddress)
UnalignedCopySize(BufferAddress)
UnalignedCopyWidth
UnalignedCopyHeight
UnalignedCopyOriginX
UnalignedCopyOriginY
UnalignedBytesPerRow
UnspecifiedBytesPerRow
UnspecifiedRowsPerImage
InvalidBytesPerRow
InvalidRowsPerImage
SizeOverflow
CopySrcMissingAspects
CopyDstMissingAspects
CopyAspectNotOne
CopyFromForbiddenTextureFormat(TextureFormat)
CopyFromForbiddenTextureFormatAspect
CopyToForbiddenTextureFormat(TextureFormat)
CopyToForbiddenTextureFormatAspect
ExternalCopyToForbiddenTextureFormat(TextureFormat)
TextureFormatsNotCopyCompatible
MemoryInitFailure(ClearError)
MissingDownlevelFlags(MissingDownlevelFlags)
InvalidSampleCount
SampleCountNotEqual
InvalidMipLevel
BufferNotAvailable
Trait Implementations§
Source§impl Clone for TransferError
impl Clone for TransferError
Source§fn clone(&self) -> TransferError
fn clone(&self) -> TransferError
Returns a duplicate 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 TransferError
impl Debug for TransferError
Source§impl Display for TransferError
impl Display for TransferError
Source§impl Error for TransferError
impl Error for TransferError
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<BufferTextureCopyInfoError> for TransferError
impl From<BufferTextureCopyInfoError> for TransferError
Source§impl From<ClearError> for TransferError
impl From<ClearError> for TransferError
Source§fn from(source: ClearError) -> Self
fn from(source: ClearError) -> Self
Converts to this type from the input type.
Source§impl From<MissingBufferUsageError> for TransferError
impl From<MissingBufferUsageError> for TransferError
Source§fn from(source: MissingBufferUsageError) -> Self
fn from(source: MissingBufferUsageError) -> Self
Converts to this type from the input type.
Source§impl From<MissingDownlevelFlags> for TransferError
impl From<MissingDownlevelFlags> for TransferError
Source§fn from(source: MissingDownlevelFlags) -> Self
fn from(source: MissingDownlevelFlags) -> Self
Converts to this type from the input type.
Source§impl From<MissingTextureUsageError> for TransferError
impl From<MissingTextureUsageError> for TransferError
Source§fn from(source: MissingTextureUsageError) -> Self
fn from(source: MissingTextureUsageError) -> Self
Converts to this type from the input type.
Source§impl From<TransferError> for CommandEncoderError
impl From<TransferError> for CommandEncoderError
Source§fn from(source: TransferError) -> Self
fn from(source: TransferError) -> Self
Converts to this type from the input type.
Source§impl From<TransferError> for QueueWriteError
impl From<TransferError> for QueueWriteError
Source§fn from(source: TransferError) -> Self
fn from(source: TransferError) -> Self
Converts to this type from the input type.
Source§impl WebGpuError for TransferError
impl WebGpuError for TransferError
Source§fn webgpu_error_type(&self) -> ErrorType
fn webgpu_error_type(&self) -> ErrorType
Determine the classification of this error as a WebGPU [
ErrorType].Auto Trait Implementations§
impl Freeze for TransferError
impl RefUnwindSafe for TransferError
impl Send for TransferError
impl Sync for TransferError
impl Unpin for TransferError
impl UnwindSafe for TransferError
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more