Skip to main content

Module source

Module source 

Source
Expand description

SourcePipe is the background-producer face of the SendPipe root form: a Signal -> () pipe with Err pinned to ProximaError. Where Handler serves one request and returns one response, a SourcePipe runs an unbounded loop that observes a cancellation Signal cooperatively and returns once it has drained.

IntervalPipe and ScheduledTriggerPipe are the canonical implementors: each wraps a run_*_loop(period, inner, factory, cancel) free function that already takes a Signal and only returns when the signal fires. SourcePipe is a blanket impl over the right SendPipe shape — nothing to implement directly.

SourceHandle is the erased, shareable form App::source stores; ProducerLifecycle drives every registered source cooperatively via spawn_from_source.

Traits§

SourceFactory
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.
SourcePipe
The background-producer face of SendPipe: Signal -> (), Err pinned to ProximaError. Blanket-implemented for every qualifying SendPipe — nothing to implement directly.

Functions§

into_source_handle
Erase a SourcePipe into a shareable SourceHandle.

Type Aliases§

SourceFactoryRegistry
The source registry — proxima_core::FactoryRegistry specialized to dyn SourceFactory, mirroring PipeFactoryRegistry.
SourceHandle
Erased, shareable source handle — the runtime-dispatch alias Arc<dyn SendDynPipe<Signal, ()>> that App::source stores.