morpheus_bootloader::tui::iso_manager::ui

Struct IsoManager

Source
pub struct IsoManager {
    state: IsoManagerState,
    storage: IsoStorageManager,
}
Expand description

ISO Manager TUI component

Fields§

§state: IsoManagerState§storage: IsoStorageManager

Implementations§

Source§

impl IsoManager

Source

pub fn new(esp_start_lba: u64, disk_size_lba: u64) -> Self

Create a new ISO manager

§Arguments
  • esp_start_lba - Start LBA of ESP partition
  • disk_size_lba - Total disk size in LBAs
Source

pub fn with_storage(storage: IsoStorageManager) -> Self

Create with existing storage manager

Source

pub fn storage(&self) -> &IsoStorageManager

Get reference to storage manager

Source

pub fn storage_mut(&mut self) -> &mut IsoStorageManager

Get mutable reference to storage manager

Source

pub fn refresh(&mut self)

Reload ISO list from storage

Source

pub fn run( &mut self, screen: &mut Screen, keyboard: &mut Keyboard, ) -> Option<usize>

Run the ISO manager UI

Returns when user presses ESC or selects boot action. Returns Some(index) if user wants to boot an ISO.

Source

fn handle_delete(&mut self, idx: usize)

Handle delete action

Source

pub fn get_boot_context(&self, idx: usize) -> Result<IsoReadContext, IsoError>

Get read context for booting an ISO

Source

pub fn is_bootable(&self, idx: usize) -> bool

Check if an ISO is ready to boot

Source

pub fn count(&self) -> usize

Get ISO count

Source

pub fn get_name(&self, idx: usize) -> Option<&str>

Get ISO name by index

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.