pub struct ImportedTextureHandle {
pub payload: Arc<dyn Any + Send + Sync>,
}Expand description
A token for a texture produced outside GPUI, on the renderer’s own device.
The payload is erased because the handle has exactly one counterparty — the application
that made the texture and the renderer that application chose — and those two agree on the
concrete type it holds. Keeping the engine blind to that type is what keeps wgpu and the
platform graphics APIs out of this crate. It is also why there is no id and no registry
beside it: the handle is the resource, so it cannot be wrong.
Fields§
§payload: Arc<dyn Any + Send + Sync>The backend’s own payload, and the one thing the engine never looks at.
Implementations§
Trait Implementations§
Source§impl Clone for ImportedTextureHandle
impl Clone for ImportedTextureHandle
Auto Trait Implementations§
impl !RefUnwindSafe for ImportedTextureHandle
impl !UnwindSafe for ImportedTextureHandle
impl Freeze for ImportedTextureHandle
impl Send for ImportedTextureHandle
impl Sync for ImportedTextureHandle
impl Unpin for ImportedTextureHandle
impl UnsafeUnpin for ImportedTextureHandle
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