[][src]Enum surfman::error::Error

pub enum Error {
    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,
    IncompatibleWinitWindow,
    IncompatibleNativeContext,
    IncompatibleNativeDevice,
}

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.

RequiredExtensionUnavailable

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.

IncompatibleSharedContext

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.

IncompatibleWinitWindow

The winit window 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.

Trait Implementations

impl Debug for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.