pub trait ReadFrom<'vfs, Vfs: Vfs<'vfs> + ?Sized>: Sized + 'vfs {
// Required method
fn read_from(path: &Vfs::Path, vfs: Pin<&'vfs Vfs>) -> VfsResult<Self, Vfs>;
}Expand description
Trait for types / structures that can be read from disk, either from a file or a directory.
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, T: 'a, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for PhantomData<T>
impl<'a, T: 'a, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for PhantomData<T>
Source§impl<'vfs, Vfs: VfsWithSeekRead<'vfs>> ReadFrom<'vfs, Vfs> for DynamicImage
Available on crate feature image only.
impl<'vfs, Vfs: VfsWithSeekRead<'vfs>> ReadFrom<'vfs, Vfs> for DynamicImage
Available on crate feature
image only.Implementors§
impl<'a, T, F, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for DirChildSingleOpt<T, F, Vfs::Path>
impl<'a, T, F, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for DirChildSingle<T, F, Vfs::Path>
impl<'a, T, F, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
impl<'a, T, H, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for VersionedHash<T, Vfs::Path, H>
impl<'a, T, P: PathType + ?Sized + 'a, F, Vfs: Vfs<'a, Path = P>> ReadFrom<'a, Vfs> for DirChildren<T, F, P>
impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for CleanDir<T>where
T: ReadFrom<'a, Vfs>,
impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
json only.impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for JsonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
json only.impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for Ron<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
ron only.impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
ron only.impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for Toml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
toml only.impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for Yaml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
yaml only.impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for FmtWrapper<T>
impl<'a, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for FileBytes
impl<'a, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for FileString
impl<'a, Vfs: Vfs<'a>, T> ReadFrom<'a, Vfs> for Versioned<T, Vfs::Path>where
T: ReadFrom<'a, Vfs>,
impl<'a, const CHECK_ON_READ: bool, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for DeferredReadOrOwn<'a, T, Vfs, CHECK_ON_READ>where
T: ReadFrom<'a, Vfs>,
impl<'a, const CHECK_ON_READ: bool, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for DeferredRead<'a, T, Vfs, CHECK_ON_READ>where
T: ReadFrom<'a, Vfs>,
impl<'vfs, T, Vfs: Vfs<'vfs> + 'vfs> ReadFrom<'vfs, Vfs> for AtomicDir<T>where
T: ReadFrom<'vfs, Vfs>,
impl<'vfs, Vfs, T, P> ReadFrom<'vfs, Vfs> for TryParse<T, P>
impl<'vfs, Vfs: Vfs<'vfs>, T: ReadFrom<'vfs, Vfs>, F: FolderFilter<Vfs::Path> + FolderRecurseFilter<Vfs::Path> + FileFilter<Vfs::Path> + 'vfs> ReadFrom<'vfs, Vfs> for DirDescendants<T, F, Vfs::Path>
impl<'vfs, Vfs: VfsWithSeekRead<'vfs>, T> ReadFrom<'vfs, Vfs> for T
Available on crate feature
image only.