pub enum MetalError {
SwiftIntOverflow {
argument: &'static str,
value: usize,
},
IndexOutOfRange {
argument: &'static str,
index: usize,
max_exclusive: usize,
},
NativeCallRejected {
operation: &'static str,
},
CommandBufferAlreadyCommitted,
CommandBufferHasActiveEncoder,
RenderEncoderAlreadyActive,
RenderEncoderCreationFailed,
RenderEncoderEnded,
UnknownPixelFormat {
raw: u64,
},
}Expand description
Errors raised before an invalid Metal operation reaches the native API.
Variants§
SwiftIntOverflow
A Rust usize cannot be represented by Swift’s signed Int.
IndexOutOfRange
A binding index exceeds the native slot count.
Fields
NativeCallRejected
The Swift bridge rejected an operation after defensive validation.
CommandBufferAlreadyCommitted
The command buffer was already committed.
CommandBufferHasActiveEncoder
A command encoder is still active on the command buffer.
RenderEncoderAlreadyActive
The command buffer already has an active render encoder.
RenderEncoderCreationFailed
Native render-encoder creation failed.
RenderEncoderEnded
The render encoder has already ended.
UnknownPixelFormat
Trait Implementations§
Source§impl Clone for MetalError
impl Clone for MetalError
Source§fn clone(&self) -> MetalError
fn clone(&self) -> MetalError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetalError
impl Debug for MetalError
Source§impl Display for MetalError
impl Display for MetalError
impl Eq for MetalError
Source§impl Error for MetalError
impl Error for MetalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for MetalError
impl PartialEq for MetalError
Source§fn eq(&self, other: &MetalError) -> bool
fn eq(&self, other: &MetalError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MetalError
Auto Trait Implementations§
impl Freeze for MetalError
impl RefUnwindSafe for MetalError
impl Send for MetalError
impl Sync for MetalError
impl Unpin for MetalError
impl UnsafeUnpin for MetalError
impl UnwindSafe for MetalError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more