Struct wgpu::core::device::DeviceLostClosure
source · pub struct DeviceLostClosure { /* private fields */ }
Implementations§
source§impl DeviceLostClosure
impl DeviceLostClosure
pub fn from_rust( callback: Box<dyn Fn(DeviceLostReason, String) + Send> ) -> DeviceLostClosure
sourcepub unsafe fn from_c(closure: DeviceLostClosureC) -> DeviceLostClosure
pub unsafe fn from_c(closure: DeviceLostClosureC) -> DeviceLostClosure
Safety
-
The callback pointer must be valid to call with the provided
user_data
pointer. -
Both pointers must point to
'static
data, as the callback may happen at an unspecified time.
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceLostClosure
impl Send for DeviceLostClosure
impl !Sync for DeviceLostClosure
impl Unpin for DeviceLostClosure
impl !UnwindSafe for DeviceLostClosure
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