pub struct PendingEffect { /* private fields */ }Expand description
A runtime effect whose shader module and pipeline exist on the device,
with the device’s verdict on them still to come: Renderer::compile_effect
made it, PendingEffect::compiled waits for the verdict, and
Renderer::register_compiled adds what passed.
It borrows nothing from the renderer, so waiting for a browser’s shader compiler (a GPU process round trip) leaves the renderer free to render, to compile other effects, or to be dropped.
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 the pipeline.
§Errors
Returns the shader’s diagnostics when it failed to compile, else the errors creating its pipeline raised.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PendingEffect
impl !Sync for PendingEffect
impl !UnwindSafe for PendingEffect
impl Freeze for PendingEffect
impl Send for PendingEffect
impl Unpin for PendingEffect
impl UnsafeUnpin for PendingEffect
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