Trait dsrc::Dsrc
[−]
[src]
pub trait Dsrc { fn tick(&mut self, cork: Cork); }
The asbract data source.
The data source is plugged into the reactor and provides information about flows.
It is expected to emit live updates using the channel passed to it during its creation. It is also called repeatedly just before a slice is closed, to provide timed information.
Required Methods
fn tick(&mut self, cork: Cork)
This gets called by the reactor before every slice closing.
The data source shall push all updates that need to happen before the slice closing into
its channel (passed to it during creation through
Factory::create
). Then it should end the batch with
the provided cork.
If there are no updates that need to happen as a result of a tick (eg. the data source has no notion of repeated data, everything is based on some external events), then the cork can be simply dropped right away.
Params
cork
: The cork to use for terminating the update batch.