pub trait Answer<R> {
// Required method
fn sample(&mut self, request: &ImageSample<R>) -> Result<[f32; 4], String>;
// Provided methods
fn load(&mut self, request: &ImageLoad<R>) -> Result<[u32; 4], String> { ... }
fn query(&mut self, request: &ImageQuery<R>) -> Result<[u32; 4], String> { ... }
}Expand description
How the caller answers a run’s texture reads (AnsweredReads), each by its request; R names the texture (a
program’s resource Element, or a bind slot). A load or a query is refused unless the answer gives one, so no read
is answered by a value nobody stated.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".