#[non_exhaustive]pub enum Error {
SurfaceSize {
width: usize,
height: usize,
},
TextureSize {
width: usize,
height: usize,
},
PixelDataLength {
expected: usize,
actual: usize,
},
TextureBudget {
requested: usize,
budget: usize,
},
UnknownTexture(TextureId),
TextureIdsExhausted,
TextureUpdateOutOfBounds(TextureId),
NonFiniteRect,
NonFiniteVertex {
index: usize,
field: VertexField,
},
IndexCount(usize),
IndexOutOfRange {
index: u32,
vertex_count: usize,
},
Raster(String),
}Expand description
Why a renderer call was rejected. Invalid input fails loudly rather than being clipped or skipped.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SurfaceSize
The surface size overflows, exceeds MAX_SURFACE_PIXELS, or
is longer than 65535 pixels on a side.
TextureSize
A texture dimension is zero or longer than 65536 texels, or the texture’s byte size overflows.
PixelDataLength
Pixel data is not exactly width * height * 4 bytes.
TextureBudget
Storing the texture would exceed MAX_TEXTURE_BYTES.
UnknownTexture(TextureId)
The texture handle was never created by this renderer, or has been freed.
TextureIdsExhausted
The handle space is exhausted: every handle from 0 through u64::MAX - 1 has been
issued. Handles are never reused, so no more textures can be created in this process.
TextureUpdateOutOfBounds(TextureId)
A texture update region does not fit inside the texture.
NonFiniteRect
A rectangle coordinate is NaN or infinite.
NonFiniteVertex
A mesh vertex has a NaN or infinite position or texture coordinate.
Fields
index: usizeIndex of the vertex in Mesh::vertices.
field: VertexFieldWhich of its coordinates is not finite.
IndexCount(usize)
A mesh’s index count is not a multiple of three.
IndexOutOfRange
A mesh index points past the end of its vertices.
Raster(String)
The rasterizer rejected the draw; the message says why.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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