#[non_exhaustive]pub enum PlatformError {
Show 15 variants
Unsupported,
NoDisplay {
wayland: bool,
},
LibraryNotFound {
library: &'static str,
reason: String,
},
MissingSymbols {
library: &'static str,
symbols: Vec<&'static str>,
},
ConnectionFailed {
display: String,
},
CallFailed {
call: &'static str,
},
InvalidName {
name: String,
},
NoHomeDirectory,
NotMainThread,
GpuCallFailed {
call: &'static str,
error: String,
},
NoGlConfig,
GlTooOld {
found: Option<String>,
},
GlContextExists,
InvalidAudioConfig {
field: &'static str,
expected: &'static str,
},
AudioCallFailed {
call: &'static str,
error: String,
},
}Expand description
Errors produced by nadir-platform.
New kinds of error can join it in a minor version (ADR-0047), so a
match on it needs a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported
This operating system has no backend yet.
NoDisplay
There is no display server to connect to.
LibraryNotFound
A system library could not be loaded.
Fields
MissingSymbols
A system library lacks functions that the engine calls.
Fields
ConnectionFailed
The display server did not accept the connection.
CallFailed
A call to the operating system failed.
InvalidName
A studio or game name cannot be a folder name on every system. See
user_dirs.
NoHomeDirectory
The user’s home directory is unknown, and the folders for settings and data are inside it.
NotMainThread
The window was to be opened on a thread other than the main one, which macOS does not allow.
GpuCallFailed
A call to EGL or OpenGL failed.
Fields
NoGlConfig
The graphics driver has no OpenGL frame buffer format with 8 bits each of red, green and blue that suits the window, or offscreen drawing.
GlTooOld
The graphics driver does not offer OpenGL 3.3 with the core profile.
Fields
GlContextExists
This thread already has an OpenGL context: the window’s, or one from
create_headless_gl. A thread can have
one at a time.
InvalidAudioConfig
A field of an AudioOutputConfig is out
of its range.
Fields
AudioCallFailed
A call to set up the audio output failed. See
open_audio.
Trait Implementations§
Source§impl Clone for PlatformError
impl Clone for PlatformError
Source§impl Debug for PlatformError
impl Debug for PlatformError
Source§impl Display for PlatformError
impl Display for PlatformError
impl Eq for PlatformError
Source§impl Error for PlatformError
impl Error for PlatformError
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()