pub enum Error {
Initialization(String),
Shader(String),
Resource(String),
Data(String),
Callback(String),
}
Expand description
Error categories.
Variants§
Initialization(String)
Failed to initialize WebGL context or retrieve DOM elements.
Shader(String)
Shader compilation, linking, or program creation errors.
Resource(String)
WebGL resource creation or management errors.
Data(String)
External data loading or parsing errors.
Callback(String)
Event listener errors, related to mouse input handling.
Implementations§
Source§impl Error
impl Error
pub fn window_not_found() -> Self
pub fn document_not_found() -> Self
pub fn canvas_not_found() -> Self
pub fn webgl_context_failed() -> Self
pub fn canvas_context_failed() -> Self
pub fn shader_creation_failed(detail: &str) -> Self
pub fn shader_program_creation_failed() -> Self
pub fn shader_link_failed(log: String) -> Self
pub fn buffer_creation_failed(buffer_type: &str) -> Self
pub fn vertex_array_creation_failed() -> Self
pub fn texture_creation_failed() -> Self
pub fn uniform_location_failed(name: &str) -> Self
pub fn webgl_error(message: String) -> Self
pub fn element_creation_failed(element_type: &str) -> Self
pub fn image_load_failed(path: &str) -> Self
pub fn deserialization_failed(message: String) -> Self
Trait Implementations§
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)>
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more