Enum citro3d::error::Error

source ·
#[non_exhaustive]
pub enum Error { System(c_int), FailedToInitialize, InvalidSize, InvalidRenderTarget, LockHeld, TooManyAttributes, TooManyBuffers, InvalidMemoryLocation, InvalidName, NotFound, }
Expand description

The common error type that may be returned by citro3d functions.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

System(c_int)

C3D error code.

§

FailedToInitialize

A C3D object or context could not be initialized.

§

InvalidSize

A size parameter was specified that cannot be converted to the proper type.

§

InvalidRenderTarget

Failed to select the given render target for drawing to.

§

LockHeld

Indicates that a reference could not be obtained because a lock is already held on the requested object.

§

TooManyAttributes

Indicates that too many vertex attributes were registered (max 12 supported).

§

TooManyBuffers

Indicates that too many vertex buffer objects were registered (max 12 supported).

§

InvalidMemoryLocation

The given memory could not be converted to a physical address for sharing with the GPU. Data should be allocated with ctru::linear.

§

InvalidName

The given name was not valid for the requested purpose.

§

NotFound

The requested resource could not be found.

Trait Implementations§

source§

impl Debug for Error

source§

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

Formats the value using the given formatter. Read more
source§

impl From<NulError> for Error

source§

fn from(_: NulError) -> Self

Converts to this type from the input type.
source§

impl From<TryFromIntError> for Error

source§

fn from(_: TryFromIntError) -> Self

Converts to this type from the input type.
source§

impl<T> From<TryLockError<T>> for Error

source§

fn from(_: TryLockError<T>) -> Self

Converts to this type from the input type.

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,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.