pub trait WriteTo<'vfs, Vfs: WriteSupportingVfs<'vfs> + ?Sized> {
// Required method
fn write_to(
&self,
path: &Vfs::Path,
vfs: Pin<&'vfs Vfs>,
) -> VfsResult<(), Vfs>;
}Expand description
Trait for types / structures that can be written to disk. All types in the library that write to files first check that the parent directories exist, so implementations of this that create the whole directory are not necessary (unless used empty children directories, in which case no directories will really be created).
Required Methods§
Implementations on Foreign Types§
Source§impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for PhantomData<T>
impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for PhantomData<T>
Source§impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for &str
impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for &str
Source§impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for &[u8]
impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for &[u8]
Source§impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for str
impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for str
Source§impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for String
impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for String
Source§impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for [u8]
impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for [u8]
Source§impl<'vfs, T, P: PathType + ?Sized + 'vfs, Vfs: WriteSupportingVfs<'vfs, Path = P>> WriteTo<'vfs, Vfs> for Option<T>where
T: WriteTo<'vfs, Vfs>,
impl<'vfs, T, P: PathType + ?Sized + 'vfs, Vfs: WriteSupportingVfs<'vfs, Path = P>> WriteTo<'vfs, Vfs> for Option<T>where
T: WriteTo<'vfs, Vfs>,
Source§impl<'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for (&DynamicImage, ImageFormat)
Available on crate feature image only.
impl<'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for (&DynamicImage, ImageFormat)
Available on crate feature
image only.Source§impl<'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for (DynamicImage, ImageFormat)
Available on crate feature image only.
impl<'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for (DynamicImage, ImageFormat)
Available on crate feature
image only.Source§impl<'vfs, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for ()
impl<'vfs, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for ()
Implementors§
impl<'a, 't, const CHECK_ON_READ: bool, T, P: PathType + ?Sized + 'a, SelfVfs: Vfs<'a, Path = P>, TargetVfs: WriteSupportingVfs<'t, Path = P>> WriteTo<'t, TargetVfs> for DeferredReadOrOwn<'a, T, SelfVfs, CHECK_ON_READ>
impl<'a, 't, const CHECK_ON_READ: bool, T, P: PathType + ?Sized + 'a, SelfVfs: Vfs<'a, Path = P>, TargetVfs: WriteSupportingVfs<'t, Path = P>> WriteTo<'t, TargetVfs> for DeferredRead<'a, T, SelfVfs, CHECK_ON_READ>
impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs> + 'vfs> WriteTo<'vfs, Vfs> for FmtWrapperRefWr<'a, 'vfs, T, Vfs>
impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for CleanDirRefWr<'a, 'vfs, T, Vfs>
impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for JsonRefWr<'a, 'vfs, T, Vfs>where
T: Serialize + 'a,
'vfs: 'a,
Available on crate feature
json only.impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for JsonPrettyRefWr<'a, 'vfs, T, Vfs>where
T: Serialize + 'a,
'vfs: 'a,
Available on crate feature
json only.impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for RonRefWr<'a, 'vfs, T, Vfs>where
T: Serialize + 'a,
'vfs: 'a,
Available on crate feature
ron only.impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for RonPrettyRefWr<'a, 'vfs, T, Vfs>where
T: Serialize + 'a,
'vfs: 'a,
Available on crate feature
ron only.impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for TomlRefWr<'a, 'vfs, T, Vfs>where
T: Serialize + 'a,
'vfs: 'a,
Available on crate feature
toml only.impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for YamlRefWr<'a, 'vfs, T, Vfs>where
T: Serialize + 'a,
'vfs: 'a,
Available on crate feature
yaml only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for AvifWriter<'a, Vfs>
Available on crate features
image and image-format-avif only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for BmpWriter<'a, Vfs>
Available on crate features
image and image-format-bmp only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for FarbfeldWriter<'a, Vfs>
Available on crate features
image and image-format-ff only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for GifWriter<'a, Vfs>
Available on crate features
image and image-format-gif only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for HdrWriter<'a, Vfs>
Available on crate features
image and image-format-hdr only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for IcoWriter<'a, Vfs>
Available on crate features
image and image-format-ico only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for JpegWriter<'a, Vfs>
Available on crate features
image and image-format-jpeg only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for OpenExrWriter<'a, Vfs>
Available on crate features
image and image-format-exr only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for PngWriter<'a, Vfs>
Available on crate features
image and image-format-png only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for PnmWriter<'a, Vfs>
Available on crate features
image and image-format-pnm only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for QoiWriter<'a, Vfs>
Available on crate feature
image only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for TgaWriter<'a, Vfs>
Available on crate features
image and image-format-tga only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for TiffWriter<'a, Vfs>
Available on crate features
image and image-format-tiff only.impl<'a, 'vfs, Vfs: VfsWithSeekWrite<'vfs>> WriteTo<'vfs, Vfs> for WebPWriter<'a, Vfs>
Available on crate features
image and image-format-webp only.impl<'a, 'vfs, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for FileBytesRefWr<'a, 'vfs, Vfs>where
'vfs: 'a,
impl<'a, 'vfs, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for FileStrWr<'a, 'vfs, Vfs>where
'vfs: 'a,
impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for DirChildSingleOpt<T, F, Vfs::Path>
impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for DirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
impl<'a, T, F: Filter<Vfs::Path>, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for DirChildSingle<T, F, Vfs::Path>where
T: WriteTo<'a, Vfs>,
impl<'a, T, H, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for VersionedHash<T, Vfs::Path, H>
impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for CleanDir<T>where
T: WriteTo<'a, Vfs>,
impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
json only.impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for JsonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
json only.impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for Ron<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
ron only.impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
ron only.impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for Toml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
toml only.impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for Yaml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
yaml only.impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for FileBytes
impl<'a, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for FileString
impl<'a, Vfs: WriteSupportingVfs<'a>, T: WriteTo<'a, Vfs>> WriteTo<'a, Vfs> for Versioned<T, Vfs::Path>
impl<'vfs, T, Vfs> WriteTo<'vfs, Vfs> for AtomicDir<T>where
T: WriteTo<'vfs, Vfs>,
Vfs: VfsSupportsTemporaryDirectories<'vfs> + Vfs<'vfs> + WriteSupportingVfs<'vfs> + 'vfs,
impl<'vfs, T, Vfs: WriteSupportingVfs<'vfs>> WriteTo<'vfs, Vfs> for FmtWrapper<T>where
T: Display,
impl<'vfs, Vfs, T, P> WriteTo<'vfs, Vfs> for TryParse<T, P>
impl<'vfs, Vfs: VfsWithSeekWrite<'vfs>, T> WriteTo<'vfs, Vfs> for T
Available on crate feature
image only.