Enum wgpu::core::command::TransferError
source · #[non_exhaustive]pub enum TransferError {
Show 36 variants
InvalidDevice(Id<Device<Api>>),
InvalidBuffer(Id<Buffer<Api>>),
InvalidTexture(Id<Texture<Api>>),
SameSourceDestinationBuffer,
MissingCopySrcUsageFlag,
MissingCopyDstUsageFlag(Option<Id<Buffer<Api>>>, Option<Id<Texture<Api>>>),
MissingRenderAttachmentUsageFlag(Id<Texture<Api>>),
BufferOverrun {
start_offset: u64,
end_offset: u64,
buffer_size: u64,
side: CopySide,
},
TextureOverrun {
start_offset: u32,
end_offset: u32,
texture_size: u32,
dimension: TextureErrorDimension,
side: CopySide,
},
InvalidTextureAspect {
format: TextureFormat,
aspect: TextureAspect,
},
InvalidTextureMipLevel {
level: u32,
total: u32,
},
InvalidDimensionExternal(Id<Texture<Api>>),
UnalignedBufferOffset(u64),
UnalignedCopySize(u64),
UnalignedCopyWidth,
UnalignedCopyHeight,
UnalignedCopyOriginX,
UnalignedCopyOriginY,
UnalignedBytesPerRow,
UnspecifiedBytesPerRow,
UnspecifiedRowsPerImage,
InvalidBytesPerRow,
InvalidCopySize,
InvalidRowsPerImage,
CopySrcMissingAspects,
CopyDstMissingAspects,
CopyAspectNotOne,
CopyFromForbiddenTextureFormat {
format: TextureFormat,
aspect: TextureAspect,
},
CopyToForbiddenTextureFormat {
format: TextureFormat,
aspect: TextureAspect,
},
ExternalCopyToForbiddenTextureFormat(TextureFormat),
InvalidDepthTextureExtent,
TextureFormatsNotCopyCompatible {
src_format: TextureFormat,
dst_format: TextureFormat,
},
MemoryInitFailure(ClearError),
MissingDownlevelFlags(MissingDownlevelFlags),
InvalidSampleCount {
sample_count: u32,
},
InvalidMipLevel {
requested: u32,
count: u32,
},
}
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.
InvalidDevice(Id<Device<Api>>)
InvalidBuffer(Id<Buffer<Api>>)
InvalidTexture(Id<Texture<Api>>)
SameSourceDestinationBuffer
MissingCopySrcUsageFlag
MissingCopyDstUsageFlag(Option<Id<Buffer<Api>>>, Option<Id<Texture<Api>>>)
MissingRenderAttachmentUsageFlag(Id<Texture<Api>>)
BufferOverrun
TextureOverrun
Fields
§
dimension: TextureErrorDimension
InvalidTextureAspect
InvalidTextureMipLevel
InvalidDimensionExternal(Id<Texture<Api>>)
UnalignedBufferOffset(u64)
UnalignedCopySize(u64)
UnalignedCopyWidth
UnalignedCopyHeight
UnalignedCopyOriginX
UnalignedCopyOriginY
UnalignedBytesPerRow
UnspecifiedBytesPerRow
UnspecifiedRowsPerImage
InvalidBytesPerRow
InvalidCopySize
InvalidRowsPerImage
CopySrcMissingAspects
CopyDstMissingAspects
CopyAspectNotOne
CopyFromForbiddenTextureFormat
CopyToForbiddenTextureFormat
ExternalCopyToForbiddenTextureFormat(TextureFormat)
InvalidDepthTextureExtent
TextureFormatsNotCopyCompatible
MemoryInitFailure(ClearError)
MissingDownlevelFlags(MissingDownlevelFlags)
InvalidSampleCount
InvalidMipLevel
Trait Implementations§
source§impl Clone for TransferError
impl Clone for TransferError
source§fn clone(&self) -> TransferError
fn clone(&self) -> TransferError
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 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)>
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<ClearError> for TransferError
impl From<ClearError> for TransferError
source§fn from(source: ClearError) -> TransferError
fn from(source: ClearError) -> TransferError
Converts to this type from the input type.
source§impl From<MissingDownlevelFlags> for TransferError
impl From<MissingDownlevelFlags> for TransferError
source§fn from(source: MissingDownlevelFlags) -> TransferError
fn from(source: MissingDownlevelFlags) -> TransferError
Converts to this type from the input type.
source§impl From<TransferError> for CopyError
impl From<TransferError> for CopyError
source§fn from(source: TransferError) -> CopyError
fn from(source: TransferError) -> CopyError
Converts to this type from the input type.
source§impl From<TransferError> for QueueWriteError
impl From<TransferError> for QueueWriteError
source§fn from(source: TransferError) -> QueueWriteError
fn from(source: TransferError) -> QueueWriteError
Converts to this type from the input type.
source§impl PrettyError for TransferError
impl PrettyError for TransferError
fn fmt_pretty(&self, fmt: &mut ErrorFormatter<'_>)
Auto Trait Implementations§
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