ImageTransform

Trait ImageTransform 

Source
pub trait ImageTransform {
    type Output<'a>: Read + 'a;

    // Required method
    fn transform<'a, S: AsRef<str>>(
        &self,
        buff: &'a [u8],
        mime: S,
    ) -> Option<(Self::Output<'a>, ImageFormat)>;
}
Expand description

a method for altering images for inclusion

Required Associated Types§

Source

type Output<'a>: Read + 'a

The result of transforming the image

Required Methods§

Source

fn transform<'a, S: AsRef<str>>( &self, buff: &'a [u8], mime: S, ) -> Option<(Self::Output<'a>, ImageFormat)>

alter an image buffer with mime

Return None to remove the image, otherwise include the format of the processed image.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§