pub enum Error {
Show 41 variants
Failed,
UnsupportedOnThisPlatform,
Unimplemented,
UnsupportedGLType,
UnsupportedGLProfile,
UnsupportedGLVersion,
PixelFormatSelectionFailed(WindowingApiError),
NoPixelFormatFound,
ContextCreationFailed(WindowingApiError),
ContextDestructionFailed(WindowingApiError),
MakeCurrentFailed(WindowingApiError),
NoGLLibraryFound,
RequiredExtensionUnavailable,
GLFunctionNotFound,
ExternalRenderTarget,
SurfaceAlreadyBound,
NoAdapterFound,
DeviceOpenFailed,
SurfaceCreationFailed(WindowingApiError),
SurfaceImportFailed(WindowingApiError),
SurfaceTextureCreationFailed(WindowingApiError),
PresentFailed(WindowingApiError),
NoCurrentContext,
NoCurrentConnection,
IncompatibleSurface,
IncompatibleContextDescriptor,
IncompatibleContext,
IncompatibleSharedContext,
IncompatibleSurfaceTexture,
NoWidgetAttached,
WidgetAttached,
InvalidNativeWidget,
SurfaceDataInaccessible,
SurfaceLockFailed,
ConnectionFailed,
ConnectionRequired,
IncompatibleAdapter,
IncompatibleNativeWidget,
IncompatibleRawDisplayHandle,
IncompatibleNativeContext,
IncompatibleNativeDevice,
}
Expand description
Various errors that methods can produce.
Variants§
Failed
The method failed for a miscellaneous reason.
UnsupportedOnThisPlatform
The platform doesn’t support this method.
Unimplemented
The platform supports this method in theory, but the functionality isn’t implemented yet.
UnsupportedGLType
The system doesn’t support the requested OpenGL API type (OpenGL or OpenGL ES).
UnsupportedGLProfile
The system doesn’t support the requested OpenGL compatibility profile for the supplied OpenGL version.
On some systems, like macOS, the compatibility profile is only supported on some GL versions.
UnsupportedGLVersion
The system doesn’t support the requested OpenGL API version.
PixelFormatSelectionFailed(WindowingApiError)
Choosing an OpenGL pixel format failed.
NoPixelFormatFound
The system couldn’t choose an OpenGL pixel format.
ContextCreationFailed(WindowingApiError)
The system couldn’t create an OpenGL context.
ContextDestructionFailed(WindowingApiError)
The system couldn’t destroy the OpenGL context.
MakeCurrentFailed(WindowingApiError)
The system couldn’t make the OpenGL context current or not current.
NoGLLibraryFound
The system OpenGL library couldn’t be located.
An extension necessary for this library to function isn’t supported.
GLFunctionNotFound
Looking up an OpenGL function address failed.
ExternalRenderTarget
This context renders to an externally-managed render target.
SurfaceAlreadyBound
A surface was already attached to this context.
NoAdapterFound
No suitable adapter could be found.
DeviceOpenFailed
The device couldn’t be opened.
SurfaceCreationFailed(WindowingApiError)
The system couldn’t create a surface.
SurfaceImportFailed(WindowingApiError)
The system couldn’t import a surface from another thread.
SurfaceTextureCreationFailed(WindowingApiError)
The system couldn’t create a surface texture from a surface.
PresentFailed(WindowingApiError)
The system couldn’t present a widget surface.
NoCurrentContext
A context couldn’t be created because there is no current context.
NoCurrentConnection
The current connection couldn’t be fetched because there is no current connection.
IncompatibleSurface
The surface was not created from this context.
IncompatibleContextDescriptor
The context descriptor is from a hardware device, but this is a software device, or vice versa.
IncompatibleContext
The context is from a hardware device, but this is a software device, or vice versa.
The shared context is not compatible for sharing.
IncompatibleSurfaceTexture
The surface texture is from a hardware device, but this is a software device, or vice versa.
NoWidgetAttached
The surface has no window attachment.
WidgetAttached
The surface has a window attachment.
InvalidNativeWidget
The native widget is invalid.
SurfaceDataInaccessible
The surface was not created with the CPU_READ_WRITE
flag, so it cannot be accessed from
the CPU.
SurfaceLockFailed
The surface could not be locked for CPU reading due to an OS error.
ConnectionFailed
A connection to the display server could not be opened.
ConnectionRequired
A connection to the window server is required to open a hardware device.
IncompatibleAdapter
The adapter type does not match the supplied connection.
IncompatibleNativeWidget
The native widget type does not match the supplied device.
IncompatibleRawDisplayHandle
The raw display handle
is incompatible with this backend.
IncompatibleNativeContext
The native context does not match the supplied device.
IncompatibleNativeDevice
The native device does not match the supplied connection.