pub trait ImportedTextureExt {
// Required method
fn to_imported_handle(&self) -> Result<ImportedTextureHandle>;
}Expand description
Builds an ImportedTextureHandle from a wgpu resource.
Required Methods§
Sourcefn to_imported_handle(&self) -> Result<ImportedTextureHandle>
fn to_imported_handle(&self) -> Result<ImportedTextureHandle>
Wrap this view as a handle.
Validates the colour-space and binding invariants up front, at the boundary where the
failure is a producer’s mistake and the message can name it. Sampling a non-sRGB view
composites with a gamma error rather than crashing, so it has to be rejected here;
TEXTURE_BINDING is likewise a property of the view and is what the renderer’s bind group
requires.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".