#[non_exhaustive]pub enum TextureDataError {
Show 14 variants
InvalidDimensions {
width: u32,
height: u32,
},
WidthOutOfRange(u32),
HeightOutOfRange(u32),
ByteSizeOutOfRange {
width: u32,
height: u32,
bytes_per_pixel: usize,
},
InvalidLayout {
width: i32,
height: i32,
bytes_per_pixel: i32,
},
ByteLengthMismatch {
expected: usize,
actual: usize,
},
InvalidStatus(TextureStatus),
MissingPixelStorage(TextureStatus),
FullUpdateRectOutOfRange {
width: u32,
height: u32,
},
InvalidRegionDimensions {
width: u32,
height: u32,
},
UpdateRegionOutOfBounds {
region: TextureRegion,
width: u32,
height: u32,
},
UpdateRegionNotRepresentable(TextureRegion),
RowPitchTooSmall {
minimum: usize,
actual: usize,
},
PayloadSizeOutOfRange {
row_pitch: usize,
height: u32,
},
}Expand description
Validation failure while creating or mutating CPU-side texture data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidDimensions
Width or height was zero.
WidthOutOfRange(u32)
Width does not fit Dear ImGui’s signed native dimension field.
HeightOutOfRange(u32)
Height does not fit Dear ImGui’s signed native dimension field.
ByteSizeOutOfRange
The native allocation size overflowed or exceeded its signed size limit.
InvalidLayout
Native metadata is not a valid texture layout.
Fields
ByteLengthMismatch
The supplied payload does not exactly match the requested byte contract.
InvalidStatus(TextureStatus)
Pixel mutation is unavailable in the WantDestroy or Destroyed lifecycle state.
MissingPixelStorage(TextureStatus)
A live texture does not have CPU-side pixel storage.
FullUpdateRectOutOfRange
The full texture cannot be represented by Dear ImGui’s 16-bit update rectangle.
InvalidRegionDimensions
A subresource region has a zero width or height.
UpdateRegionOutOfBounds
A subresource rectangle exceeds the texture bounds.
UpdateRegionNotRepresentable(TextureRegion)
A live update region cannot be represented by Dear ImGui’s native update queue.
RowPitchTooSmall
The supplied row pitch cannot hold one tightly packed source row.
PayloadSizeOutOfRange
Computing the strided payload size overflowed.
Trait Implementations§
Source§impl Clone for TextureDataError
impl Clone for TextureDataError
Source§fn clone(&self) -> TextureDataError
fn clone(&self) -> TextureDataError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TextureDataError
Source§impl Debug for TextureDataError
impl Debug for TextureDataError
Source§impl Display for TextureDataError
impl Display for TextureDataError
impl Eq for TextureDataError
Source§impl Error for TextureDataError
impl Error for TextureDataError
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()