WriteImageToAsync

Trait WriteImageToAsync 

Source
pub trait WriteImageToAsync<'a>: WriteSupportingVfsAsync {
    type WriteImageFuture: Future<Output = VfsResult<(), Self>> + Send + Unpin + 'a;

    // Required method
    fn write_image_async(
        self: Pin<&'a Self>,
        path: <Self::Path as PathType>::OwnedPath,
        image: DynamicImage,
        format: ImageFormat,
    ) -> Self::WriteImageFuture;
}
Available on crate features async and image only.
Expand description

A trait implemented by async vfs implementations that support writing images.

Required Associated Types§

Source

type WriteImageFuture: Future<Output = VfsResult<(), Self>> + Send + Unpin + 'a

The future type returned by the write_image_async method.

Required Methods§

Source

fn write_image_async( self: Pin<&'a Self>, path: <Self::Path as PathType>::OwnedPath, image: DynamicImage, format: ImageFormat, ) -> Self::WriteImageFuture

Writes an image file at the specified path, using the specified image and format.

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§

Source§

impl<'vfs> WriteImageToAsync<'vfs> for TokioFsVfs

Available on crate feature tokio only.
Source§

type WriteImageFuture = Pin<Box<dyn Future<Output = Result<(), Error<PathBuf>>> + Send + 'vfs>>