Trait wgpu_hal::dynamic::DynResourceExt
source · trait DynResourceExt {
// Required methods
fn expect_downcast_ref<T: DynResource>(&self) -> &T;
fn expect_downcast_mut<T: DynResource>(&mut self) -> &mut T;
unsafe fn unbox<T: DynResource + 'static>(self: Box<Self>) -> T;
}
Expand description
Extension trait for DynResource
used by implementations of various dynamic resource traits.
Required Methods§
sourcefn expect_downcast_ref<T: DynResource>(&self) -> &T
fn expect_downcast_ref<T: DynResource>(&self) -> &T
§Panics
- Panics if
self
is not downcastable toT
.
sourcefn expect_downcast_mut<T: DynResource>(&mut self) -> &mut T
fn expect_downcast_mut<T: DynResource>(&mut self) -> &mut T
§Panics
- Panics if
self
is not downcastable toT
.
sourceunsafe fn unbox<T: DynResource + 'static>(self: Box<Self>) -> T
unsafe fn unbox<T: DynResource + 'static>(self: Box<Self>) -> T
Object Safety§
This trait is not object safe.