pub trait WriteToAsync<'a, Vfs: WriteSupportingVfsAsync + ?Sized + 'a> {
type Future: Future<Output = VfsResult<(), Vfs>> + Send + Unpin + 'a;
// Required method
fn write_to_async(
self,
path: <<Vfs as VfsCore>::Path as PathType>::OwnedPath,
vfs: Pin<&'a Vfs>,
) -> Self::Future;
}Available on crate feature
async only.Expand description
Trait for types / structures that can be written to disk asynchronously.
The difference between this and WriteToAsyncRef is that this trait takes in
owned data instead of a reference.
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Option<T>where
T: WriteToAsync<'a, Vfs> + Send + 'static,
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Option<T>where
T: WriteToAsync<'a, Vfs> + Send + 'static,
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for PhantomData<T>
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for PhantomData<T>
Source§impl<'a, Vfs> WriteToAsync<'a, Vfs> for (&'a DynamicImage, ImageFormat)where
Vfs: WriteSupportingVfsAsync + WriteImageToAsyncRef<'a> + 'a,
Available on crate feature image only.
impl<'a, Vfs> WriteToAsync<'a, Vfs> for (&'a DynamicImage, ImageFormat)where
Vfs: WriteSupportingVfsAsync + WriteImageToAsyncRef<'a> + 'a,
Available on crate feature
image only.type Future = <Vfs as WriteImageToAsyncRef<'a>>::WriteImageRefFuture
fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future
Source§impl<'a, Vfs> WriteToAsync<'a, Vfs> for (DynamicImage, ImageFormat)where
Vfs: WriteSupportingVfsAsync + WriteImageToAsync<'a> + 'a,
Available on crate feature image only.
impl<'a, Vfs> WriteToAsync<'a, Vfs> for (DynamicImage, ImageFormat)where
Vfs: WriteSupportingVfsAsync + WriteImageToAsync<'a> + 'a,
Available on crate feature
image only.type Future = <Vfs as WriteImageToAsync<'a>>::WriteImageFuture
fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for &'a str
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for &'a str
type Future = <Vfs as WriteSupportingVfsAsync>::WriteFuture<'a>
fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for &'a [u8]
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for &'a [u8]
type Future = <Vfs as WriteSupportingVfsAsync>::WriteFuture<'a>
fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for String
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for String
type Future = <FileString as WriteToAsync<'a, Vfs>>::Future
fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Vec<u8>
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Vec<u8>
type Future = <FileBytesRefWr<'a, 'a, Vfs> as WriteToAsync<'a, Vfs>>::Future
fn write_to_async( self, path: <Vfs::Path as PathType>::OwnedPath, vfs: Pin<&'a Vfs>, ) -> Self::Future
Source§impl<'a, Vfs: WriteSupportingVfsAsync + ?Sized + 'a> WriteToAsync<'a, Vfs> for ()
impl<'a, Vfs: WriteSupportingVfsAsync + ?Sized + 'a> WriteToAsync<'a, Vfs> for ()
Implementors§
Source§impl<'a, 'vfs, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FmtWrapperRefWr<'a, 'vfs, T, Vfs>
impl<'a, 'vfs, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FmtWrapperRefWr<'a, 'vfs, T, Vfs>
type Future = <FileString as WriteToAsync<'a, Vfs>>::Future
Source§impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
Source§impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
Source§impl<'a, T, P, H, Vfs: WriteSupportingVfsAsync<Path = P> + 'a> WriteToAsync<'a, Vfs> for VersionedHash<T, P, H>
impl<'a, T, P, H, Vfs: WriteSupportingVfsAsync<Path = P> + 'a> WriteToAsync<'a, Vfs> for VersionedHash<T, P, H>
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for CleanDir<T>
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for CleanDir<T>
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for CleanDirRefWr<'a, 'a, T, Vfs>where
T: WriteToAsyncRef<'a, Vfs> + Send + Sync + 'static,
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> WriteToAsync<'a, Vfs> for CleanDirRefWr<'a, 'a, T, Vfs>where
T: WriteToAsyncRef<'a, Vfs> + Send + Sync + 'static,
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> WriteToAsync<'a, Vfs> for Json<T>
Available on crate feature json only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Json<T>
Available on crate feature
json only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for JsonRefWr<'a, 'a, T, Vfs>
Available on crate feature json only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for JsonRefWr<'a, 'a, T, Vfs>
Available on crate feature
json only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for JsonPretty<T>
Available on crate feature json only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for JsonPretty<T>
Available on crate feature
json only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for JsonPrettyRefWr<'a, 'a, T, Vfs>
Available on crate feature json only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for JsonPrettyRefWr<'a, 'a, T, Vfs>
Available on crate feature
json only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Ron<T>
Available on crate feature ron only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Ron<T>
Available on crate feature
ron only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonRefWr<'a, 'a, T, Vfs>
Available on crate feature ron only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonRefWr<'a, 'a, T, Vfs>
Available on crate feature
ron only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonPretty<T>
Available on crate feature ron only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonPretty<T>
Available on crate feature
ron only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonPrettyRefWr<'a, 'a, T, Vfs>
Available on crate feature ron only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonPrettyRefWr<'a, 'a, T, Vfs>
Available on crate feature
ron only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Toml<T>
Available on crate feature toml only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Toml<T>
Available on crate feature
toml only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for TomlRefWr<'a, 'a, T, Vfs>
Available on crate feature toml only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for TomlRefWr<'a, 'a, T, Vfs>
Available on crate feature
toml only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Yaml<T>
Available on crate feature yaml only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Yaml<T>
Available on crate feature
yaml only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for YamlRefWr<'a, 'a, T, Vfs>
Available on crate feature yaml only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for YamlRefWr<'a, 'a, T, Vfs>
Available on crate feature
yaml only.Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FmtWrapper<T>
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FmtWrapper<T>
type Future = <FileString as WriteToAsync<'a, Vfs>>::Future
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Versioned<T, Vfs::Path>
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for Versioned<T, Vfs::Path>
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileBytesRefWr<'a, 'a, Vfs>
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileBytesRefWr<'a, 'a, Vfs>
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileStrWr<'a, 'a, Vfs>
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileStrWr<'a, 'a, Vfs>
type Future = <FileBytesRefWr<'a, 'a, Vfs> as WriteToAsync<'a, Vfs>>::Future
Source§impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileString
impl<'a, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for FileString
Source§impl<'a, const CHECK_ON_READ: bool, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for DeferredReadOrOwn<'a, T, Vfs, CHECK_ON_READ>where
T: for<'b> ReadFromAsync<'b, Vfs> + for<'b> WriteToAsync<'b, Vfs> + Send + 'static,
for<'b> <T as ReadFromAsync<'b, Vfs>>::Future: Future<Output = VfsResult<T, Vfs>> + Unpin + 'b,
for<'b> <T as WriteToAsync<'b, Vfs>>::Future: Future<Output = VfsResult<(), Vfs>> + Unpin + 'b,
impl<'a, const CHECK_ON_READ: bool, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for DeferredReadOrOwn<'a, T, Vfs, CHECK_ON_READ>where
T: for<'b> ReadFromAsync<'b, Vfs> + for<'b> WriteToAsync<'b, Vfs> + Send + 'static,
for<'b> <T as ReadFromAsync<'b, Vfs>>::Future: Future<Output = VfsResult<T, Vfs>> + Unpin + 'b,
for<'b> <T as WriteToAsync<'b, Vfs>>::Future: Future<Output = VfsResult<(), Vfs>> + Unpin + 'b,
Source§impl<'f, const CHECK_ON_READ: bool, T, P: PathType + ?Sized + 'f, SelfVfs: VfsAsync<Path = P> + 'f, TargetVfs: WriteSupportingVfsAsync<Path = P> + 'f> WriteToAsync<'f, TargetVfs> for DeferredRead<'f, T, SelfVfs, CHECK_ON_READ>where
T: for<'a> ReadFromAsync<'a, SelfVfs> + for<'a> WriteToAsync<'a, TargetVfs> + Send + 'static,
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> WriteToAsync<'f, TargetVfs> for DeferredRead<'f, T, SelfVfs, CHECK_ON_READ>where
T: for<'a> ReadFromAsync<'a, SelfVfs> + for<'a> WriteToAsync<'a, TargetVfs> + Send + 'static,
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<'vfs, T, Vfs> WriteToAsync<'vfs, Vfs> for AtomicDir<T>where
T: WriteToAsync<'vfs, Vfs> + Send + 'static,
Vfs: VfsSupportsTemporaryDirectoriesAsync<'vfs> + VfsAsync + Send + WriteSupportingVfsAsync + 'vfs,
impl<'vfs, T, Vfs> WriteToAsync<'vfs, Vfs> for AtomicDir<T>where
T: WriteToAsync<'vfs, Vfs> + Send + 'static,
Vfs: VfsSupportsTemporaryDirectoriesAsync<'vfs> + VfsAsync + Send + WriteSupportingVfsAsync + 'vfs,
Source§impl<'vfs, Vfs, P: PathType + ?Sized + 'vfs, T: ImgFormat> WriteToAsync<'vfs, Vfs> for Twhere
Vfs: 'vfs + VfsAsyncWithSeekWrite<Path = P>,
Vfs::WFile: AsyncSeek,
(DynamicImage, ImageFormat): WriteToAsync<'vfs, Vfs>,
Available on crate feature image only.
impl<'vfs, Vfs, P: PathType + ?Sized + 'vfs, T: ImgFormat> WriteToAsync<'vfs, Vfs> for Twhere
Vfs: 'vfs + VfsAsyncWithSeekWrite<Path = P>,
Vfs::WFile: AsyncSeek,
(DynamicImage, ImageFormat): WriteToAsync<'vfs, Vfs>,
Available on crate feature
image only.