#[non_exhaustive]pub enum WebGlError {
Render(RenderError),
ContextUnavailable,
OperationFailed {
operation: WebGlOperation,
message: Option<String>,
},
TooManyInstances,
ResourceTextureTooLarge {
width: u32,
height: u32,
max_dimension: u32,
},
IncompatibleContext(IncompatibleContextReason),
}Expand description
Errors produced by the WebGL backend.
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.
Render(RenderError)
Rendering failed for a certain reason.
A WebGL2 context could not be created for the canvas.
OperationFailed
A WebGL operation failed.
Fields
§
operation: WebGlOperationThe failed operation.
TooManyInstances
A render pass contains too many instances for WebGL.
ResourceTextureTooLarge
A resource texture allocation exceeds the supported texture dimensions.
Fields
IncompatibleContext(IncompatibleContextReason)
The WebGL context is incompatible with the renderer.
Trait Implementations§
Source§impl Clone for WebGlError
impl Clone for WebGlError
Source§impl Debug for WebGlError
impl Debug for WebGlError
Source§impl Display for WebGlError
impl Display for WebGlError
Source§impl Error for WebGlError
impl Error for WebGlError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<RenderError> for WebGlError
impl From<RenderError> for WebGlError
Source§fn from(source: RenderError) -> Self
fn from(source: RenderError) -> Self
Converts to this type from the input type.
Source§impl From<WebGlError> for WebGlProbeError
impl From<WebGlError> for WebGlProbeError
Source§fn from(source: WebGlError) -> Self
fn from(source: WebGlError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WebGlError
impl RefUnwindSafe for WebGlError
impl Send for WebGlError
impl Sync for WebGlError
impl Unpin for WebGlError
impl UnsafeUnpin for WebGlError
impl UnwindSafe for WebGlError
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