pub trait ReadFromAsync<'a, Vfs: VfsAsync + ?Sized + 'a>: Sized + 'a {
type Future: Future<Output = VfsResult<Self, Vfs>> + Send + Unpin + 'a
where Self: 'a;
// Required method
fn read_from_async(
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 read from disk asynchronously.
async version of ReadFrom.
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, T, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for PhantomData<T>
impl<'a, T, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for PhantomData<T>
Source§impl<'a, T, Vfs: VfsAsync<Path = P> + 'a, P: PathType + ?Sized + 'a> ReadFromAsync<'a, Vfs> for Option<T>where
T: ReadFromAsync<'a, Vfs> + 'static,
T::Future: Future<Output = VfsResult<T, Vfs>> + Unpin + 'a,
impl<'a, T, Vfs: VfsAsync<Path = P> + 'a, P: PathType + ?Sized + 'a> ReadFromAsync<'a, Vfs> for Option<T>where
T: ReadFromAsync<'a, Vfs> + 'static,
T::Future: Future<Output = VfsResult<T, Vfs>> + Unpin + 'a,
Source§impl<'a, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for String
impl<'a, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for String
Implementors§
Source§impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for DirChildren<T, F, Vfs::Path>
Source§impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
impl<'a, T, F, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for ForceCreateDirChildren<T, F, Vfs::Path>
Source§impl<'a, T, H, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for VersionedHash<T, Vfs::Path, H>
impl<'a, T, H, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for VersionedHash<T, Vfs::Path, H>
Source§impl<'a, T, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for CleanDir<T>where
T: ReadFromAsync<'a, Vfs> + Send + 'static,
impl<'a, T, Vfs: VfsAsync + 'a> ReadFromAsync<'a, Vfs> for CleanDir<T>where
T: ReadFromAsync<'a, Vfs> + Send + 'static,
Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature json only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
json only.Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for JsonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature json only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for JsonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
json only.Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Ron<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature ron only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Ron<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
ron only.Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature ron only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
ron only.Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Toml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature toml only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Toml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
toml only.Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Yaml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature yaml only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for Yaml<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
yaml only.Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for FmtWrapper<T>
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for FmtWrapper<T>
Source§impl<'a, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for FileBytes
impl<'a, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for FileBytes
Source§impl<'a, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for FileString
impl<'a, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for FileString
Source§impl<'a, Vfs: VfsAsync + 'static, T: ReadFromAsync<'a, Vfs> + Send + 'static> ReadFromAsync<'a, Vfs> for Versioned<T, Vfs::Path>
impl<'a, Vfs: VfsAsync + 'static, T: ReadFromAsync<'a, Vfs> + Send + 'static> ReadFromAsync<'a, Vfs> for Versioned<T, Vfs::Path>
Source§impl<'a, const CHECK_ON_READ: bool, T, Vfs: VfsAsync<Path = P> + 'static, P: PathType + ?Sized + 'a> ReadFromAsync<'a, Vfs> for DeferredReadOrOwn<'a, T, Vfs, CHECK_ON_READ>
impl<'a, const CHECK_ON_READ: bool, T, Vfs: VfsAsync<Path = P> + 'static, P: PathType + ?Sized + 'a> ReadFromAsync<'a, Vfs> for DeferredReadOrOwn<'a, T, Vfs, CHECK_ON_READ>
Source§impl<'a, const CHECK_ON_READ: bool, T, Vfs: VfsAsync<Path = P> + 'static, P: PathType + ?Sized + 'a> ReadFromAsync<'a, Vfs> for DeferredRead<'a, T, Vfs, CHECK_ON_READ>where
T: Send + ReadFromAsync<'a, Vfs> + 'static,
impl<'a, const CHECK_ON_READ: bool, T, Vfs: VfsAsync<Path = P> + 'static, P: PathType + ?Sized + 'a> ReadFromAsync<'a, Vfs> for DeferredRead<'a, T, Vfs, CHECK_ON_READ>where
T: Send + ReadFromAsync<'a, Vfs> + 'static,
Source§impl<'vfs, P: PathType + ?Sized + 'vfs, Vfs: VfsAsync<Path = P> + 'static, T: ReadFromAsync<'vfs, Vfs> + Send + 'static, F: FolderFilter<P> + FolderRecurseFilter<P> + FileFilter<P> + 'vfs> ReadFromAsync<'vfs, Vfs> for DirDescendants<T, F, P>
impl<'vfs, P: PathType + ?Sized + 'vfs, Vfs: VfsAsync<Path = P> + 'static, T: ReadFromAsync<'vfs, Vfs> + Send + 'static, F: FolderFilter<P> + FolderRecurseFilter<P> + FileFilter<P> + 'vfs> ReadFromAsync<'vfs, Vfs> for DirDescendants<T, F, P>
Source§impl<'vfs, T, Vfs: VfsAsync + 'vfs> ReadFromAsync<'vfs, Vfs> for AtomicDir<T>where
T: ReadFromAsync<'vfs, Vfs> + Send + 'static,
impl<'vfs, T, Vfs: VfsAsync + 'vfs> ReadFromAsync<'vfs, Vfs> for AtomicDir<T>where
T: ReadFromAsync<'vfs, Vfs> + Send + 'static,
Source§impl<'vfs, Vfs, T> ReadFromAsync<'vfs, Vfs> for T
Available on crate feature image only.
impl<'vfs, Vfs, T> ReadFromAsync<'vfs, Vfs> for T
Available on crate feature
image only.