pub struct MonitorConfig<Source, SourceTime, Verdict = Incremental, VerdictTime = RelativeFloat>where
    Source: Input,
    SourceTime: TimeRepresentation,
    Verdict: VerdictRepresentation,
    VerdictTime: OutputTimeRepresentation,
{ /* private fields */ }
Expand description

A configuration struct containing all information (including type information) to initialize a Monitor.

Implementations§

Creates a new monitor config from a config

Examples found in repository?
src/configuration/config_builder.rs (line 414)
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
    pub fn build(self) -> MonitorConfig<Source, InputTime, Verdict, OutputTime> {
        let ConfigBuilder {
            output_time_representation,
            start_time,
            state:
                VerdictConfigured {
                    ir,
                    input_time_representation,
                    mode,
                    ..
                },
        } = self;
        let config = Config {
            ir,
            mode,
            input_time_representation,
            output_time_representation,
            start_time,
        };
        MonitorConfig::new(config)
    }

Returns the underlying configuration

Transforms the configuration into a Monitor using the provided data to setup the input source.

Examples found in repository?
src/configuration/config_builder.rs (line 422)
418
419
420
421
422
423
    pub fn monitor_with_data(
        self,
        data: Source::CreationData,
    ) -> Result<Monitor<Source, InputTime, Verdict, OutputTime>, Source::Error> {
        self.build().monitor_with_data(data)
    }

Transforms the configuration into a Monitor

Examples found in repository?
src/configuration/config_builder.rs (line 430)
426
427
428
429
430
431
    pub fn monitor(self) -> Result<Monitor<Source, InputTime, Verdict, OutputTime>, Source::Error>
    where
        Source: Input<CreationData = ()> + 'static,
    {
        self.build().monitor()
    }

Transforms the configuration into a QueuedMonitor using the provided data to setup the input source.

Examples found in repository?
src/configuration/config_builder.rs (line 439)
435
436
437
438
439
440
    pub fn queued_monitor_with_data(
        self,
        data: Source::CreationData,
    ) -> QueuedMonitor<Source, InputTime, Verdict, OutputTime> {
        self.build().queued_monitor_with_data(data)
    }

Transforms the configuration into a QueuedMonitor

Examples found in repository?
src/configuration/config_builder.rs (line 448)
444
445
446
447
448
449
    pub fn queued_monitor(self) -> QueuedMonitor<Source, InputTime, Verdict, OutputTime>
    where
        Source: Input<CreationData = ()> + 'static,
    {
        self.build().queued_monitor()
    }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.