pub struct DummyFetchProvider;Expand description
A FetchProvider that answers every request with FetchError::NoProvider.
It answers rather than doing nothing, which is where it differs from
DummyNetProvider, and the difference is
deliberate. A dropped resource load leaves an image unpainted, which is
visible and survivable. A dropped fetch leaves the guest waiting on an
answer that will never come, and a guest awaiting a promise that never
settles is indistinguishable from a hang. So the no-op provider here fails
fast instead of going quiet.
Trait Implementations§
Source§impl Default for DummyFetchProvider
impl Default for DummyFetchProvider
Source§impl FetchProvider for DummyFetchProvider
impl FetchProvider for DummyFetchProvider
fn fetch(&self, _request: FetchRequest, handler: Box<dyn FetchHandler>)
Auto Trait Implementations§
impl Freeze for DummyFetchProvider
impl RefUnwindSafe for DummyFetchProvider
impl Send for DummyFetchProvider
impl Sync for DummyFetchProvider
impl Unpin for DummyFetchProvider
impl UnsafeUnpin for DummyFetchProvider
impl UnwindSafe for DummyFetchProvider
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