pub struct Context {
pub device: Arc<Device>,
pub queue: Arc<Queue>,
pub adapter: Arc<Adapter>,
/* private fields */
}Expand description
The physical device and queue, potentially also owned by GPUI.
Construct with from_shared when importing a renderer’s existing device.
That constructor does not change either of wgpu’s process/device callbacks.
Forward a renderer-owned loss callback into notify_lost so all logical
clients observe the same device generation becoming unusable.
Fields§
§device: Arc<Device>§queue: Arc<Queue>§adapter: Arc<Adapter>Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Forget for Context
impl Freeze for Contextwhere
*const ArcInner<Device> is !null: Freeze,
PhantomData<ArcInner<Device>>: Freeze,
*const ArcInner<Queue> is !null: Freeze,
PhantomData<ArcInner<Queue>>: Freeze,
*const ArcInner<Adapter> is !null: Freeze,
PhantomData<ArcInner<Adapter>>: Freeze,
*const ArcInner<Mutex<Option<DeviceLoss>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<Option<DeviceLoss>>>>: Freeze,
*const ArcInner<Context> is !null: Freeze,
PhantomData<ArcInner<Context>>: Freeze,
*const ArcInner<dyn Any + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Any + Sync + Send>>: Freeze,
impl Move for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Contextwhere
*const ArcInner<Device> is !null: UnsafeUnpin,
PhantomData<ArcInner<Device>>: UnsafeUnpin,
*const ArcInner<Queue> is !null: UnsafeUnpin,
PhantomData<ArcInner<Queue>>: UnsafeUnpin,
*const ArcInner<Adapter> is !null: UnsafeUnpin,
PhantomData<ArcInner<Adapter>>: UnsafeUnpin,
*const ArcInner<Mutex<Option<DeviceLoss>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Option<DeviceLoss>>>>: UnsafeUnpin,
*const ArcInner<Context> is !null: UnsafeUnpin,
PhantomData<ArcInner<Context>>: UnsafeUnpin,
*const ArcInner<dyn Any + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Any + Sync + Send>>: UnsafeUnpin,
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