pub struct Config<Mode: ExecutionMode, OutputTime: OutputTimeRepresentation> {
pub ir: RtLolaMir,
pub mode: Mode,
pub output_time_representation: PhantomData<OutputTime>,
pub start_time: Option<SystemTime>,
}
Expand description
Config
combines an RTLola specification in RtLolaMir form with various configuration parameters for the interpreter.
The configuration describes how the specification should be executed.
The Config
can then be turned into a monitor for use via the API or simply executed.
Fields§
§ir: RtLolaMir
The representation of the specification
mode: Mode
In which mode the evaluator is executed
output_time_representation: PhantomData<OutputTime>
Which format to use to output time
start_time: Option<SystemTime>
The start time to assume
Implementations§
Source§impl<Mode: ExecutionMode, OutputTime: OutputTimeRepresentation> Config<Mode, OutputTime>
impl<Mode: ExecutionMode, OutputTime: OutputTimeRepresentation> Config<Mode, OutputTime>
Sourcepub fn api(ir: RtLolaMir) -> Config<OfflineMode<RelativeFloat>, OutputTime>
pub fn api(ir: RtLolaMir) -> Config<OfflineMode<RelativeFloat>, OutputTime>
Creates a new API config
Sourcepub fn monitor<Source: EventFactory, Verdict: VerdictRepresentation>(
self,
data: Source::CreationData,
) -> Result<Monitor<Source, Mode, Verdict, OutputTime>, EventFactoryError>
pub fn monitor<Source: EventFactory, Verdict: VerdictRepresentation>( self, data: Source::CreationData, ) -> Result<Monitor<Source, Mode, Verdict, OutputTime>, EventFactoryError>
Turn the configuration into the Monitor API.
Trait Implementations§
Source§impl<Mode: Clone + ExecutionMode, OutputTime: Clone + OutputTimeRepresentation> Clone for Config<Mode, OutputTime>
impl<Mode: Clone + ExecutionMode, OutputTime: Clone + OutputTimeRepresentation> Clone for Config<Mode, OutputTime>
Auto Trait Implementations§
impl<Mode, OutputTime> Freeze for Config<Mode, OutputTime>where
Mode: Freeze,
impl<Mode, OutputTime> RefUnwindSafe for Config<Mode, OutputTime>where
Mode: RefUnwindSafe,
OutputTime: RefUnwindSafe,
impl<Mode, OutputTime> Send for Config<Mode, OutputTime>where
Mode: Send,
impl<Mode, OutputTime> Sync for Config<Mode, OutputTime>
impl<Mode, OutputTime> Unpin for Config<Mode, OutputTime>
impl<Mode, OutputTime> UnwindSafe for Config<Mode, OutputTime>where
Mode: UnwindSafe,
OutputTime: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more