Skip to main content

TextureDataError

Enum TextureDataError 

Source
#[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
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.
§

InvalidDimensions

Width or height was zero.

Fields

§width: u32

Requested texture width.

§height: u32

Requested texture height.

§

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.

Fields

§width: u32

Texture width.

§height: u32

Texture height.

§bytes_per_pixel: usize

Bytes per pixel.

§

InvalidLayout

Native metadata is not a valid texture layout.

Fields

§width: i32

Native width.

§height: i32

Native height.

§bytes_per_pixel: i32

Native bytes per pixel.

§

ByteLengthMismatch

The supplied payload does not exactly match the requested byte contract.

Fields

§expected: usize

Required payload length.

§actual: usize

Supplied payload length.

§

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.

Fields

§width: u32

Texture width.

§height: u32

Texture height.

§

InvalidRegionDimensions

A subresource region has a zero width or height.

Fields

§width: u32

Requested region width.

§height: u32

Requested region height.

§

UpdateRegionOutOfBounds

A subresource rectangle exceeds the texture bounds.

Fields

§region: TextureRegion

Requested region.

§width: u32

Texture width.

§height: u32

Texture height.

§

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.

Fields

§minimum: usize

Minimum tightly packed row size.

§actual: usize

Supplied row pitch.

§

PayloadSizeOutOfRange

Computing the strided payload size overflowed.

Fields

§row_pitch: usize

Supplied row pitch.

§height: u32

Rectangle height.

Trait Implementations§

Source§

impl Clone for TextureDataError

Source§

fn clone(&self) -> TextureDataError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TextureDataError

Source§

impl Debug for TextureDataError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TextureDataError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TextureDataError

Source§

impl Error for TextureDataError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<TextureDataError> for ManagedTextureMutationError

Source§

fn from(source: TextureDataError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for TextureDataError

Source§

fn eq(&self, other: &TextureDataError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TextureDataError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.