Skip to main content

ImageSink

Trait ImageSink 

Source
pub trait ImageSink: Send + Sync {
    // Required method
    fn save(&self, bytes: Vec<u8>, ext: &str) -> Result<String, ImageGenError>;
}
Expand description

Persists image bytes and returns a URL the frontend can fetch.

Required Methods§

Source

fn save(&self, bytes: Vec<u8>, ext: &str) -> Result<String, ImageGenError>

Write bytes with extension ext, return the served URL.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§