Skip to main content

ScanJob

Type Alias ScanJob 

Source
pub type ScanJob = Box<dyn FnOnce() -> Result<Vec<DirEntry>, ScanError> + Send + 'static>;
Expand description

The job passed to a ScanExecutor — always just “call swdir::scan_dir on this path”.

We pre-bake the path into the closure rather than exposing a “scan this path” method on the trait, because trait methods returning boxed futures must take a 'static closure argument, and smuggling the path via capture is the cleanest way to do that.

Kept as a type alias so the trait signature reads at a glance.

Aliased Type§

pub struct ScanJob(/* private fields */);