Enum EncoderStateError
#[non_exhaustive]pub enum EncoderStateError {
Invalid,
Ended,
Locked,
Unlocked,
Submitted,
}
unstable-wgpu-26
only.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§
§impl Clone for EncoderStateError
impl Clone for EncoderStateError
§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 more§impl Debug for EncoderStateError
impl Debug for EncoderStateError
§impl Display for EncoderStateError
impl Display for EncoderStateError
§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
§impl From<EncoderStateError> for BuildAccelerationStructureError
impl From<EncoderStateError> for BuildAccelerationStructureError
§fn from(source: EncoderStateError) -> BuildAccelerationStructureError
fn from(source: EncoderStateError) -> BuildAccelerationStructureError
§impl From<EncoderStateError> for ClearError
impl From<EncoderStateError> for ClearError
§fn from(source: EncoderStateError) -> ClearError
fn from(source: EncoderStateError) -> ClearError
§impl From<EncoderStateError> for CommandEncoderError
impl From<EncoderStateError> for CommandEncoderError
§fn from(source: EncoderStateError) -> CommandEncoderError
fn from(source: EncoderStateError) -> CommandEncoderError
§impl From<EncoderStateError> for CompactBlasError
impl From<EncoderStateError> for CompactBlasError
§fn from(source: EncoderStateError) -> CompactBlasError
fn from(source: EncoderStateError) -> CompactBlasError
§impl From<EncoderStateError> for ComputePassErrorInner
impl From<EncoderStateError> for ComputePassErrorInner
§fn from(source: EncoderStateError) -> ComputePassErrorInner
fn from(source: EncoderStateError) -> ComputePassErrorInner
§impl From<EncoderStateError> for QueryError
impl From<EncoderStateError> for QueryError
§fn from(source: EncoderStateError) -> QueryError
fn from(source: EncoderStateError) -> QueryError
§impl From<EncoderStateError> for RenderPassErrorInner
impl From<EncoderStateError> for RenderPassErrorInner
§fn from(source: EncoderStateError) -> RenderPassErrorInner
fn from(source: EncoderStateError) -> RenderPassErrorInner
§impl WebGpuError for EncoderStateError
impl WebGpuError for EncoderStateError
§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 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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.SharedString
.