Trait http_fs::config::FsTaskSpawner
source · 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.
Object Safety§
This trait is not object safe.