(
&mut self,
_args: &ImageGenerationArgs,
mut callback: F,
)
| 175 | #[async_trait] |
| 176 | impl ImageGenerator for MockImageGenerator { |
| 177 | async fn generate_image<F>( |
| 178 | &mut self, |
| 179 | _args: &ImageGenerationArgs, |
| 180 | mut callback: F, |
| 181 | ) -> Result<()> |
| 182 | where |
| 183 | F: FnMut(Vec<ImageBuffer<Rgb<u8>, Vec<u8>>>) + Send + 'static, |
| 184 | { |
| 185 | let img = ImageBuffer::from_pixel(1, 1, Rgb([255u8, 0, 0])); |
| 186 | callback(vec![img]); |
| 187 | Ok(()) |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | #[async_trait] |
no test coverage detected