#[non_exhaustive]pub enum EncoderStateError {
Invalid,
Ended,
Locked,
Unlocked,
Submitted,
}Expand description
Errors related to the state of a command or pass encoder.
The exact behavior of these errors may change based on the resolution of https://github.com/gpuweb/gpuweb/issues/5207.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invalid
Used internally by wgpu functions to indicate the encoder already contained an error. This variant should usually not be seen by users of the API, since an effort should be made to provide the caller with a more specific reason for the encoder being invalid.
Ended
Returned immediately when an attempt is made to encode a command using an encoder that has already finished.
Locked
Returned by a subsequent call to encoder.finish(), if there was an
attempt to open a second pass on the encoder while it was locked for
a first pass (i.e. the first pass was still open).
Note: only command encoders can be locked (not pass encoders).
Unlocked
Returned when attempting to end a pass if the parent encoder is not locked. This can only happen if pass begin/end calls are mismatched.
Submitted
The command buffer has already been submitted.
Although command encoders and command buffers are distinct WebGPU
objects, we use CommandEncoderStatus for both.
Trait Implementations§
Source§impl Clone for EncoderStateError
impl Clone for EncoderStateError
Source§fn clone(&self) -> EncoderStateError
fn clone(&self) -> EncoderStateError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncoderStateError
impl Debug for EncoderStateError
Source§impl Display for EncoderStateError
impl Display for EncoderStateError
Source§impl Error for EncoderStateError
impl Error for EncoderStateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<EncoderStateError> for BuildAccelerationStructureError
impl From<EncoderStateError> for BuildAccelerationStructureError
Source§fn from(source: EncoderStateError) -> BuildAccelerationStructureError
fn from(source: EncoderStateError) -> BuildAccelerationStructureError
Source§impl From<EncoderStateError> for ClearError
impl From<EncoderStateError> for ClearError
Source§fn from(source: EncoderStateError) -> ClearError
fn from(source: EncoderStateError) -> ClearError
Source§impl From<EncoderStateError> for CommandEncoderError
impl From<EncoderStateError> for CommandEncoderError
Source§fn from(source: EncoderStateError) -> CommandEncoderError
fn from(source: EncoderStateError) -> CommandEncoderError
Source§impl From<EncoderStateError> for CompactBlasError
impl From<EncoderStateError> for CompactBlasError
Source§fn from(source: EncoderStateError) -> CompactBlasError
fn from(source: EncoderStateError) -> CompactBlasError
Source§impl From<EncoderStateError> for ComputePassErrorInner
impl From<EncoderStateError> for ComputePassErrorInner
Source§fn from(source: EncoderStateError) -> ComputePassErrorInner
fn from(source: EncoderStateError) -> ComputePassErrorInner
Source§impl From<EncoderStateError> for QueryError
impl From<EncoderStateError> for QueryError
Source§fn from(source: EncoderStateError) -> QueryError
fn from(source: EncoderStateError) -> QueryError
Source§impl From<EncoderStateError> for RenderPassErrorInner
impl From<EncoderStateError> for RenderPassErrorInner
Source§fn from(source: EncoderStateError) -> RenderPassErrorInner
fn from(source: EncoderStateError) -> RenderPassErrorInner
Source§impl WebGpuError for EncoderStateError
impl WebGpuError for EncoderStateError
Source§fn webgpu_error_type(&self) -> ErrorType
fn webgpu_error_type(&self) -> ErrorType
ErrorType.Auto Trait Implementations§
impl Freeze for EncoderStateError
impl RefUnwindSafe for EncoderStateError
impl Send for EncoderStateError
impl Sync for EncoderStateError
impl Unpin for EncoderStateError
impl UnsafeUnpin for EncoderStateError
impl UnwindSafe for EncoderStateError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more