pub trait SourceFactory: Named {
// Required method
fn build(&self, spec: &Value) -> Result<SourceHandle, ProximaError>;
}Expand description
Config-driven source factory: the SourcePipe analogue of
PipeFactory. IntervalPipe and
ScheduledTriggerPipe each register a thin SourceFactory so
App::apply_settings’s producer-graph-config step resolves a TOML row
straight into a SourceHandle via the shared
FactoryRegistry primitive.
Required Methods§
Sourcefn build(&self, spec: &Value) -> Result<SourceHandle, ProximaError>
fn build(&self, spec: &Value) -> Result<SourceHandle, ProximaError>
Build a source from a config spec.
§Errors
Returns Err when the spec fails to parse or lower into a source.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".