pub fn configure_boot_metrics(ui: &mut egui::Ui, boot_metrics: &mut BootMetrics, port: &Port) {
    let mut metrics_box = matches!(boot_metrics, BootMetrics::Enabled { .. });
    ui.horizontal_wrapped(|ui| {
        ui.checkbox(&mut metrics_box, "Boot Metrics");
        match (metrics_box, &boot_metrics) {
            (true, BootMetrics::Disabled) => *boot_metrics = BootMetrics::Enabled { timing: false },
            (false, BootMetrics::Enabled { .. }) => *boot_metrics = BootMetrics::Disabled,
            _ => {}
        }
        ui.label("Relay information about the boot process through RAM memory.");
    });
    ui.horizontal_wrapped(|ui| {
        let mut dummy = false;
        let timing_box =
            if let BootMetrics::Enabled { timing } = boot_metrics { timing } else { &mut dummy };
        ui.separator();
        ui.set_enabled(BootMetrics::timing_supported(port) && metrics_box);
        ui.checkbox(timing_box, "Timing Metrics");
        ui.label("Include boot timing as part of the boot metrics.");
    });
}
/// Renders the menu to configure the boot metrics feature (information relayed from the bootloader
/// to the running application, including an optional boot timing report.
Renders the menu to configure the boot metrics feature (information relayed from the bootloader
to the running application, including an optional boot timing report.
Renders the menu to configure the boot metrics feature ( information relayed from the bootloader to the running application including an optional boot timing report .
pub fn configure_boot_metrics(ui: &mut egui::Ui, boot_metrics: &mut BootMetrics, port: &Port) {
    let mut metrics_box = matches!(boot_metrics, BootMetrics::Enabled { .. });
    ui.horizontal_wrapped(|ui| {
        ui.checkbox(&mut metrics_box, "Boot Metrics");
        match (metrics_box, &boot_metrics) {
            (true, BootMetrics::Disabled) => *boot_metrics = BootMetrics::Enabled { timing: false },
            (false, BootMetrics::Enabled { .. }) => *boot_metrics = BootMetrics::Disabled,
            _ => {}
        }
        ui.label("Relay information about the boot process through RAM memory.");
    });
    ui.horizontal_wrapped(|ui| {
        let mut dummy = false;
        let timing_box =
            if let BootMetrics::Enabled { timing } = boot_metrics { timing } else { &mut dummy };
        ui.separator();
        ui.set_enabled(BootMetrics::timing_supported(port) && metrics_box);
        ui.checkbox(timing_box, "Timing Metrics");
        ui.label("Include boot timing as part of the boot metrics.");
    });
}
pub fn configure_boot_metrics ( ui : & mut egui :: Ui , boot_metrics : & mut BootMetrics , port : & Port ) { let mut metrics_box = matches ! ( boot_metrics BootMetrics Enabled { } ) ; ui . horizontal_wrapped ( | ui | { ui . checkbox ( & mut metrics_box , " " ) ; match ( metrics_box , & boot_metrics ) { ( true , BootMetrics :: Disabled ) => * boot_metrics = BootMetrics :: Enabled { timing : false } , ( false , BootMetrics :: Enabled { .. } ) => * boot_metrics = BootMetrics :: Disabled , _ => { } } ui . label ( " " ) ; } ) ; ui . horizontal_wrapped ( | ui | { let mut dummy = false ; let timing_box = if let BootMetrics :: Enabled { timing } = boot_metrics { timing } else { & mut dummy } ; ui . separator ( ) ; ui . set_enabled ( BootMetrics :: timing_supported ( port ) && metrics_box ) ; ui . checkbox ( timing_box , " " ) ; ui . label ( " " ) ; } ) ; }
Renders the menu to configure the boot metrics feature (information relayed from the bootloader
to the running application, including an optional boot timing report.
Renders the menu to configure the boot metrics feature ( information relayed from the bootloader to the running application including an optional boot timing report .
ui
&mut egui::Ui
boot_metrics
&mut BootMetrics
port
&Port
ui
&mut egui::Ui
boot_metrics
&mut BootMetrics
port
&Port