pub trait WriteToAsyncRef<'r, Vfs: WriteSupportingVfsAsync + ?Sized + 'r> {
type Future<'a>: Future<Output = VfsResult<(), Vfs>> + Send + Unpin + 'a
where Self: 'a,
Vfs: 'a,
'r: 'a;
// Required method
fn write_to_async_ref<'a>(
&'a self,
path: <<Vfs as VfsCore>::Path as PathType>::OwnedPath,
vfs: Pin<&'a Vfs>,
) -> Self::Future<'a>
where 'r: 'a;
}Available on crate feature
async only.Expand description
Trait for types / structures that can be written to disk asynchronously.
The difference between this and WriteToAsync is that this trait takes in
a reference instead of owned data.
This is an async equivalent of WriteTo.
Required Associated Types§
Required Methods§
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.
Implementations on Foreign Types§
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'a, Vfs> for String
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'a, Vfs> for String
type Future<'b> = <FileString as WriteToAsync<'b, Vfs>>::Future where Self: 'b, Vfs: 'b, 'a: 'b
fn write_to_async_ref<'b>(
&'b self,
path: <Vfs::Path as PathType>::OwnedPath,
vfs: Pin<&'b Vfs>,
) -> <Self as WriteToAsync<'b, Vfs>>::Futurewhere
'a: 'b,
Implementors§
Source§impl<'a, T, H, Vfs: WriteSupportingVfsAsync + 'a> WriteToAsyncRef<'a, Vfs> for VersionedHash<T, Vfs::Path, H>
impl<'a, T, H, Vfs: WriteSupportingVfsAsync + 'a> WriteToAsyncRef<'a, Vfs> for VersionedHash<T, Vfs::Path, H>
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'a, Vfs> for CleanDir<T>where
T: WriteToAsyncRef<'a, Vfs> + Send + Sync + 'static,
for<'f> <T as WriteToAsyncRef<'a, Vfs>>::Future<'f>: Future<Output = VfsResult<(), Vfs>> + Unpin + 'f,
for<'f> <Vfs as VfsAsync>::ExistsFuture<'f>: Future<Output = VfsResult<bool, Vfs>> + Unpin + 'f,
for<'f> <Vfs as WriteSupportingVfsAsync>::RemoveDirAllFuture<'f>: Future<Output = VfsResult<(), Vfs>> + Unpin + 'f,
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'a, Vfs> for CleanDir<T>where
T: WriteToAsyncRef<'a, Vfs> + Send + Sync + 'static,
for<'f> <T as WriteToAsyncRef<'a, Vfs>>::Future<'f>: Future<Output = VfsResult<(), Vfs>> + Unpin + 'f,
for<'f> <Vfs as VfsAsync>::ExistsFuture<'f>: Future<Output = VfsResult<bool, Vfs>> + Unpin + 'f,
for<'f> <Vfs as WriteSupportingVfsAsync>::RemoveDirAllFuture<'f>: Future<Output = VfsResult<(), Vfs>> + Unpin + 'f,
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'a, Vfs> for FmtWrapper<T>
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'a, Vfs> for FmtWrapper<T>
type Future<'b> = <FileString as WriteToAsync<'b, Vfs>>::Future where Self: 'b, Vfs: 'b, 'a: 'b
Source§impl<'f, const CHECK_ON_READ: bool, T, P: PathType + ?Sized + 'f, SelfVfs: VfsAsync<Path = P> + 'f, TargetVfs: WriteSupportingVfsAsync<Path = P> + 'f> WriteToAsyncRef<'f, TargetVfs> for DeferredRead<'f, T, SelfVfs, CHECK_ON_READ>where
for<'a> T: ReadFromAsync<'a, SelfVfs> + WriteToAsync<'a, TargetVfs> + Send + 'a,
for<'a> <T as ReadFromAsync<'a, SelfVfs>>::Future: Future<Output = VfsResult<T, SelfVfs>> + Unpin + 'a,
for<'a> <T as WriteToAsync<'a, TargetVfs>>::Future: Future<Output = VfsResult<(), TargetVfs>> + Unpin + 'a,
impl<'f, const CHECK_ON_READ: bool, T, P: PathType + ?Sized + 'f, SelfVfs: VfsAsync<Path = P> + 'f, TargetVfs: WriteSupportingVfsAsync<Path = P> + 'f> WriteToAsyncRef<'f, TargetVfs> for DeferredRead<'f, T, SelfVfs, CHECK_ON_READ>where
for<'a> T: ReadFromAsync<'a, SelfVfs> + WriteToAsync<'a, TargetVfs> + Send + 'a,
for<'a> <T as ReadFromAsync<'a, SelfVfs>>::Future: Future<Output = VfsResult<T, SelfVfs>> + Unpin + 'a,
for<'a> <T as WriteToAsync<'a, TargetVfs>>::Future: Future<Output = VfsResult<(), TargetVfs>> + Unpin + 'a,
Source§impl<'r, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'r, Vfs> for DirChildren<T, F, Vfs::Path>
impl<'r, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'r, Vfs> for DirChildren<T, F, Vfs::Path>
Source§impl<'r, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'r, Vfs> for Versioned<T, Vfs::Path>
impl<'r, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsyncRef<'r, Vfs> for Versioned<T, Vfs::Path>
Source§impl<'vfs, T, Vfs> WriteToAsyncRef<'vfs, Vfs> for AtomicDir<T>where
T: WriteToAsyncRef<'vfs, Vfs> + Sync + 'static,
for<'r> <T as WriteToAsyncRef<'vfs, Vfs>>::Future<'r>: Future<Output = VfsResult<(), Vfs>> + Unpin + Send + 'r,
for<'r> Vfs: VfsSupportsTemporaryDirectoriesAsync<'r> + VfsAsync + Send + 'static + WriteSupportingVfsAsync + 'vfs,
impl<'vfs, T, Vfs> WriteToAsyncRef<'vfs, Vfs> for AtomicDir<T>where
T: WriteToAsyncRef<'vfs, Vfs> + Sync + 'static,
for<'r> <T as WriteToAsyncRef<'vfs, Vfs>>::Future<'r>: Future<Output = VfsResult<(), Vfs>> + Unpin + Send + 'r,
for<'r> Vfs: VfsSupportsTemporaryDirectoriesAsync<'r> + VfsAsync + Send + 'static + WriteSupportingVfsAsync + 'vfs,
Source§impl<'vfs, Vfs, P: PathType + ?Sized + 'vfs, T: ImgFormat> WriteToAsyncRef<'vfs, Vfs> for Twhere
Vfs: 'vfs + VfsAsyncWithSeekWrite<Path = P>,
Vfs::WFile: AsyncSeek,
for<'a> (&'a DynamicImage, ImageFormat): WriteToAsync<'a, Vfs>,
Available on crate feature image only.
impl<'vfs, Vfs, P: PathType + ?Sized + 'vfs, T: ImgFormat> WriteToAsyncRef<'vfs, Vfs> for Twhere
Vfs: 'vfs + VfsAsyncWithSeekWrite<Path = P>,
Vfs::WFile: AsyncSeek,
for<'a> (&'a DynamicImage, ImageFormat): WriteToAsync<'a, Vfs>,
Available on crate feature
image only.