pub trait FsTaskSpawner:
Send
+ Clone
+ Unpin {
type SpawnError: Error + Debug + Display + Send + Sync + 'static;
type FileReadFut: Future<Output = Result<FileReadResult, Self::SpawnError>> + Unpin;
// Required method
fn spawn_file_read<F: FnOnce() -> FileReadResult + Send + 'static>(
fut: F,
) -> Self::FileReadFut;
}
Expand description
Describes task spawner for FS related tasks
Required Associated Types§
Sourcetype FileReadFut: Future<Output = Result<FileReadResult, Self::SpawnError>> + Unpin
type FileReadFut: Future<Output = Result<FileReadResult, Self::SpawnError>> + Unpin
File read future spawned on IO runtime
Required Methods§
Sourcefn spawn_file_read<F: FnOnce() -> FileReadResult + Send + 'static>(
fut: F,
) -> Self::FileReadFut
fn spawn_file_read<F: FnOnce() -> FileReadResult + Send + 'static>( fut: F, ) -> Self::FileReadFut
Spawns file reading task task onto runtime.
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.