Trait rtlola_interpreter::monitor::Input
source · pub trait Input: Sized {
type Record: Send;
type Error: Error + Send + 'static;
type CreationData: Clone + Send;
fn new(
map: HashMap<String, InputReference>,
setup_data: Self::CreationData
) -> Result<Self, Self::Error>;
fn get_event(&self, rec: Self::Record) -> Result<Event, Self::Error>;
}Expand description
This trait provides the functionality to pass inputs to the monitor. You can either implement this trait for your own Datatype or use one of the predefined input methods. See RecordInput and EventInput
Required Associated Types§
sourcetype Error: Error + Send + 'static
type Error: Error + Send + 'static
The error type returned by the input source on IO errors or parsing issues.
sourcetype CreationData: Clone + Send
type CreationData: Clone + Send
Arbitrary type of the data provided to the input source at creation time.
Required Methods§
sourcefn new(
map: HashMap<String, InputReference>,
setup_data: Self::CreationData
) -> Result<Self, Self::Error>
fn new(
map: HashMap<String, InputReference>,
setup_data: Self::CreationData
) -> Result<Self, Self::Error>
Creates a new input source from a HashMap mapping the names of the inputs in the specification to their position in the event.