pub trait AppTextureBackend:
Send
+ Sync
+ Debug
+ 'static {
// Required methods
fn id(&self) -> AppTextureId;
fn size_px(&self) -> (u32, u32);
fn format(&self) -> SurfaceFormat;
fn as_any(&self) -> &dyn Any;
// Provided method
fn backend_name(&self) -> &'static str { ... }
}Expand description
Backend implementation of an AppTexture. Implemented by
aetna-wgpu and aetna-vulkano against their native texture types;
the runtime downcasts via Self::as_any in the backend’s record
path.
Required Methods§
Sourcefn id(&self) -> AppTextureId
fn id(&self) -> AppTextureId
Stable identity allocated by the constructor — must round-trip
the same value on every call for the lifetime of self.
Sourcefn size_px(&self) -> (u32, u32)
fn size_px(&self) -> (u32, u32)
Pixel size of the underlying texture. The backend uses this for sanity checks; the widget rect comes from layout, not from here.
Sourcefn format(&self) -> SurfaceFormat
fn format(&self) -> SurfaceFormat
Pixel format of the underlying texture. Used by the backend to pick a sampler / shader path.
Provided Methods§
Sourcefn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Human-readable concrete backend type for diagnostics.