1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Interfaces required to support UEFI event logging.

use std::fmt::Debug;

#[derive(Debug)]
pub enum UefiEvent {
    BootSuccess(BootInfo),
    BootFailure(BootInfo),
    NoBootDevice,
}

#[derive(Debug)]
pub struct BootInfo {
    pub secure_boot_succeeded: bool,
}

/// Interface to log UEFI events.
pub trait UefiLogger: Send {
    fn log_event(&self, event: UefiEvent);
}