WriteImageToAsyncRef

Trait WriteImageToAsyncRef 

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

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

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

Required Associated Types§

Source

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

The future type returned by the write_image_async_ref method.

Required Methods§

Source

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

Writes an image file at the specified path, using the specified image reference 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> WriteImageToAsyncRef<'vfs> for TokioFsVfs
where 'vfs: 'vfs,

Available on crate feature tokio only.
Source§

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