lanzaboote/rust/tool/shared/src/esp.rs

19 lines
614 B
Rust
Raw Normal View History

use std::path::{Path, PathBuf};
use crate::architecture::Architecture;
/// Generic ESP paths which can be specific to a bootloader
pub trait EspPaths<const N: usize> {
/// Build an ESP path structure out of the ESP root directory
fn new(esp: impl AsRef<Path>, arch: Architecture) -> Self;
2023-09-14 06:38:40 -04:00
/// Return the used file paths to store as garbage collection roots.
fn iter(&self) -> std::array::IntoIter<&PathBuf, N>;
2023-09-14 06:38:40 -04:00
/// Returns the path containing NixOS EFI binaries
fn nixos_path(&self) -> &Path;
2023-09-14 06:38:40 -04:00
/// Returns the path containing Linux EFI binaries
fn linux_path(&self) -> &Path;
2022-11-23 09:26:26 -05:00
}