wgpu/api/
external_texture.rs1use crate::*;
2
3#[derive(Debug, Clone)]
9pub struct ExternalTexture {
10 pub(crate) inner: dispatch::DispatchExternalTexture,
11}
12#[cfg(send_sync)]
13static_assertions::assert_impl_all!(ExternalTexture: Send, Sync);
14
15crate::cmp::impl_eq_ord_hash_proxy!(ExternalTexture => .inner);
16
17impl ExternalTexture {
18 pub fn destroy(&self) {
20 self.inner.destroy();
21 }
22
23 #[cfg(custom)]
25 pub fn as_custom<T: custom::ExternalTextureInterface>(&self) -> Option<&T> {
26 self.inner.as_custom()
27 }
28}
29
30pub type ExternalTextureDescriptor<'a> = wgt::ExternalTextureDescriptor<Label<'a>>;
37static_assertions::assert_impl_all!(ExternalTextureDescriptor<'_>: Send, Sync);