pub trait TransformFactory<Input> {
type Transform: Transform<Input>;
type Error;
// Required method
fn create(
&self,
worker: Option<&WorkerContext>,
) -> Result<Self::Transform, Self::Error>;
}Expand description
Constructs one transform for a serial iterator or worker.
Local factories and transforms may remain non-Send on the default serial
loader. Selecting positive workers adds the thread-safety bounds.
Required Associated Types§
Required Methods§
Sourcefn create(
&self,
worker: Option<&WorkerContext>,
) -> Result<Self::Transform, Self::Error>
fn create( &self, worker: Option<&WorkerContext>, ) -> Result<Self::Transform, Self::Error>
Creates a transform for worker, or for the serial path when None.
A persistent worker receives its pool-lifetime context here. Individual
task transforms receive generation cancellation through TaskContext.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".