Struct wgpu_core::device::DeviceLostClosure
source · pub struct DeviceLostClosure {
inner: DeviceLostClosureInner,
}
Fields§
§inner: DeviceLostClosureInner
Implementations§
source§impl DeviceLostClosure
impl DeviceLostClosure
pub fn from_rust(callback: DeviceLostCallback) -> Self
sourcepub unsafe fn from_c(closure: DeviceLostClosureC) -> Self
pub unsafe fn from_c(closure: DeviceLostClosureC) -> Self
§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.
pub(crate) fn call(self, reason: DeviceLostReason, message: String)
Auto Trait Implementations§
impl Freeze for DeviceLostClosure
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