pub enum TextureTransferError {
Show 15 variants
UnsupportedPixelFormat {
pixel_format: usize,
},
CpuInaccessibleStorage {
storage_mode: usize,
},
InvalidMipmapLevel {
mipmap_level: usize,
mipmap_level_count: usize,
},
InvalidSlice {
slice: usize,
array_length: usize,
},
EmptyRegion,
UnsupportedDepth {
depth: usize,
},
UnsupportedTextureType {
texture_type: usize,
},
RegionOutOfBounds {
origin: (usize, usize),
size: (usize, usize),
mip_size: (usize, usize),
},
BlockMisaligned {
field: &'static str,
value: usize,
block_size: usize,
},
BytesPerRowTooSmall {
bytes_per_row: usize,
minimum: usize,
},
BytesPerRowMisaligned {
bytes_per_row: usize,
bytes_per_block: usize,
},
LayoutOverflow,
IntegerOutOfRange {
field: &'static str,
value: usize,
},
BufferTooShort {
actual: usize,
required: usize,
},
NativeRejected,
}Expand description
Re-exports the Metal framework surface for this item.
Errors returned by CPU texture uploads and readback.
Variants§
UnsupportedPixelFormat
The texture format does not have a supported CPU byte layout.
CpuInaccessibleStorage
The texture storage mode cannot be accessed through CPU transfer APIs.
InvalidMipmapLevel
The requested mipmap level does not exist.
InvalidSlice
The requested array slice does not exist.
EmptyRegion
A zero-sized transfer region was requested.
UnsupportedDepth
A two-dimensional transfer was requested for a depth texture.
UnsupportedTextureType
The texture kind is not compatible with a two-dimensional CPU transfer.
RegionOutOfBounds
The region exceeds the selected mip level.
BlockMisaligned
A compressed-format coordinate is not block aligned.
BytesPerRowTooSmall
The row stride is shorter than the format requires.
BytesPerRowMisaligned
The row stride is not aligned to a complete format block.
LayoutOverflow
Checked layout arithmetic overflowed.
IntegerOutOfRange
A value cannot be represented by the native API.
BufferTooShort
The source or destination byte slice is too short.
NativeRejected
The native bridge rejected a validated transfer.
Trait Implementations§
Source§impl Clone for TextureTransferError
impl Clone for TextureTransferError
Source§fn clone(&self) -> TextureTransferError
fn clone(&self) -> TextureTransferError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextureTransferError
impl Debug for TextureTransferError
Source§impl Display for TextureTransferError
impl Display for TextureTransferError
impl Eq for TextureTransferError
Source§impl Error for TextureTransferError
impl Error for TextureTransferError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()