pub trait EventSource<InputTime: TimeRepresentation> {
type Record: AssociatedEventFactory;
type Error: Error;
// Required methods
fn init_data(
&self,
) -> Result<<<Self::Record as AssociatedEventFactory>::Factory as EventFactory>::CreationData, Self::Error>;
fn next_event(
&mut self,
) -> Result<Option<(Self::Record, InputTime::InnerTime)>, Self::Error>;
}Expand description
The main trait that has to be implemented by an input plugin
Required Associated Types§
Sourcetype Record: AssociatedEventFactory
type Record: AssociatedEventFactory
Type of the Event given to the monitor
Required Methods§
Sourcefn init_data(
&self,
) -> Result<<<Self::Record as AssociatedEventFactory>::Factory as EventFactory>::CreationData, Self::Error>
fn init_data( &self, ) -> Result<<<Self::Record as AssociatedEventFactory>::Factory as EventFactory>::CreationData, Self::Error>
Return the data needed by the monitor to initialize the input source.