Enum ggez::error::GameError[][src]

pub enum GameError {
Show 17 variants FilesystemError(String), ConfigError(String), EventLoopError(String), ResourceLoadError(String), ResourceNotFound(StringVec<(PathBuf, GameError)>), RenderError(String), AudioError(String), WindowError(String), WindowCreationError(Arc<CreationError>), IOError(Arc<Error>), FontError(String), VideoError(String), ShaderProgramError(ProgramError), GamepadError(String), LyonError(String), CanvasMSAAError, CustomError(String),
}
Expand description

An enum containing all kinds of game framework errors.

Variants

FilesystemError(String)

An error in the filesystem layout

Tuple Fields of FilesystemError

0: String
ConfigError(String)

An error in the config file

Tuple Fields of ConfigError

0: String
EventLoopError(String)

Happens when an winit::event_loop::EventLoopProxy attempts to wake up an winit::event_loop::EventLoop that no longer exists.

Tuple Fields of EventLoopError

0: String
ResourceLoadError(String)

An error trying to load a resource, such as getting an invalid image file.

Tuple Fields of ResourceLoadError

0: String
ResourceNotFound(StringVec<(PathBuf, GameError)>)

Unable to find a resource; the Vec is the paths it searched for and associated errors

Tuple Fields of ResourceNotFound

0: String1: Vec<(PathBuf, GameError)>
RenderError(String)

Something went wrong in the renderer

Tuple Fields of RenderError

0: String
AudioError(String)

Something went wrong in the audio playback

Tuple Fields of AudioError

0: String
WindowError(String)

Something went wrong trying to set or get window properties.

Tuple Fields of WindowError

0: String
WindowCreationError(Arc<CreationError>)

Something went wrong trying to create a window

Tuple Fields of WindowCreationError

0: Arc<CreationError>
IOError(Arc<Error>)

Something went wrong trying to read from a file

Tuple Fields of IOError

0: Arc<Error>
FontError(String)

Something went wrong trying to load/render a font

Tuple Fields of FontError

0: String
VideoError(String)

Something went wrong applying video settings.

Tuple Fields of VideoError

0: String
ShaderProgramError(ProgramError)

Something went wrong compiling shaders

Tuple Fields of ShaderProgramError

0: ProgramError
GamepadError(String)

Something went wrong with the gilrs gamepad-input library.

Tuple Fields of GamepadError

0: String
LyonError(String)

Something went wrong with the lyon shape-tesselation library.

Tuple Fields of LyonError

0: String
CanvasMSAAError

You tried to use MSAA on canvases with GLES, which isn’t supported.

CustomError(String)

A custom error type for use by users of ggez. This lets you handle custom errors that may happen during your game (such as, trying to load a malformed file for a level) using the same mechanism you handle ggez’s other errors.

Please include an informative message with the error.

Tuple Fields of CustomError

0: String

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.