pub struct PendingEffect { /* private fields */ }Expand description
A runtime effect created on the device, awaiting the device’s verdict.
Made by Renderer::compile_effect, awaited with PendingEffect::compiled, added by
Renderer::register_compiled. It borrows nothing from the renderer, so the renderer stays
usable while a browser’s shader compiler answers.
Implementations§
Source§impl PendingEffect
impl PendingEffect
Sourcepub async fn compiled(self) -> Result<CompiledEffect, ShaderDiagnostics>
pub async fn compiled(self) -> Result<CompiledEffect, ShaderDiagnostics>
Waits for the device’s verdict on the shader and pipeline.
§Errors
The shader’s diagnostics if it failed, else the pipeline creation errors.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PendingEffect
impl !RefUnwindSafe for PendingEffect
impl !Sync for PendingEffect
impl !UnwindSafe for PendingEffect
impl Forget for PendingEffect
impl Move for PendingEffect
impl Send for PendingEffect
impl Unpin for PendingEffectwhere
Arc<CoreDevice>: Unpin,
&'static str: Unpin,
Arc<str>: Unpin,
Arc<EffectDef>: Unpin,
*const u8 is !null: Unpin,
Align4<u32>: Unpin,
Arc<CoreShaderModule>: Unpin,
Arc<CoreBindGroupLayout>: Unpin,
Arc<CoreRenderPipeline>: Unpin,
Box<dyn Future<Output = CompilationInfo> + Send>: Unpin,
Box<dyn Future<Output = Vec<Error>> + Send>: Unpin,
impl UnsafeUnpin for PendingEffectwhere
*const ArcInner<CoreDevice> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreDevice>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<EffectDef> is !null: UnsafeUnpin,
PhantomData<ArcInner<EffectDef>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<UniformField>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
*const ArcInner<CoreShaderModule> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreShaderModule>>: UnsafeUnpin,
*const ArcInner<CoreBindGroupLayout> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreBindGroupLayout>>: UnsafeUnpin,
*const ArcInner<CoreRenderPipeline> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreRenderPipeline>>: UnsafeUnpin,
PhantomData<EffectPipeline>: UnsafeUnpin,
*const dyn Future<Output = CompilationInfo> + Send is !null: UnsafeUnpin,
PhantomData<dyn Future<Output = CompilationInfo> + Send>: UnsafeUnpin,
*const dyn Future<Output = Vec<Error>> + Send is !null: UnsafeUnpin,
PhantomData<dyn Future<Output = Vec<Error>> + Send>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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