pub trait ReadImageFromAsync<T>: VfsAsyncwhere
T: ImgFormat,{
type ReadImageFuture<'a>: Future<Output = VfsResult<T, Self>> + Send + Unpin + 'a
where Self: 'a;
// Required method
fn read_image_async<'a>(
self: Pin<&'a Self>,
path: <Self::Path as PathType>::OwnedPath,
) -> Self::ReadImageFuture<'a>;
}Available on crate features
async and image only.Expand description
A trait implemented by async vfs implementations that support reading images.
Required Associated Types§
Sourcetype ReadImageFuture<'a>: Future<Output = VfsResult<T, Self>> + Send + Unpin + 'a
where
Self: 'a
type ReadImageFuture<'a>: Future<Output = VfsResult<T, Self>> + Send + Unpin + 'a where Self: 'a
The future type returned by the read_image_async method.
Required Methods§
Sourcefn read_image_async<'a>(
self: Pin<&'a Self>,
path: <Self::Path as PathType>::OwnedPath,
) -> Self::ReadImageFuture<'a>
fn read_image_async<'a>( self: Pin<&'a Self>, path: <Self::Path as PathType>::OwnedPath, ) -> Self::ReadImageFuture<'a>
Reads an image file at the specified path, returning the decoded image and its 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.