Enum surfman::error::Error

source ·
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.

§

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.

§

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.

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.