pub struct App {Show 14 fields
pub title: String,
pub mode: Mode,
pub budget: Budget,
pub cx: Context,
pub powers: Powers,
pub slots: Vec<Slot>,
pub selected: usize,
pub status: String,
pub config_path: String,
pub balanced: bool,
pub bg: Background,
pub used: BackgroundUsed,
pub headline: [Option<Delivered>; 4],
pub other_budget: Budget,
}Expand description
The planner’s state.
Fields§
§title: StringTitle line.
mode: ModeWhich paper.
budget: BudgetResource budget.
cx: ContextWorkload.
powers: PowersSide powers.
slots: Vec<Slot>Components.
selected: usizeSelected control.
status: StringStatus line.
config_path: StringWhere W writes the build flags.
balanced: boolThe powers are the balanced split for the current settings.
bg: BackgroundThe DSig paper’s background setting (auto or manual).
used: BackgroundUsedThe background in use, with what the planner would choose.
headline: [Option<Delivered>; 4]Each mode’s delivered rates as last planned (Mode::ALL order),
for the headline that shows every paper.
other_budget: BudgetThe budget of the modes on the other side of the uBFT line: the
papers plan an engine budget, the uBFT modes the whole device
(Budget::whole_device). Switching across swaps them.
Implementations§
Source§impl App
Controls, key handling and planning for the TUI.
impl App
Controls, key handling and planning for the TUI.
Sourcepub fn new(title: &str, mode: Mode, slots: Vec<Slot>) -> App
pub fn new(title: &str, mode: Mode, slots: Vec<Slot>) -> App
A planner for slots, balanced for the default settings.
Sourcepub fn has_paper(&self, mode: Mode) -> bool
pub fn has_paper(&self, mode: Mode) -> bool
Whether this chip has the modules of mode’s paper: a paper’s
signing module decides it (Ed25519 signing for the Ed25519 paper,
DSig signing for the DSig paper; a uBFT module of that role for a
uBFT mode).
Sourcepub fn sha_lut_knob(&self) -> Option<(usize, usize)>
pub fn sha_lut_knob(&self) -> Option<(usize, usize)>
The SHA-512 line’s LUT allowance knob: (slot, knob index).
Sourcepub fn sha_auto(&self) -> bool
pub fn sha_auto(&self) -> bool
Whether the SHA-512 line sizes itself to demand (its “size” knob on auto).
Sourcepub fn lut_split(&self) -> (f64, f64, f64)
pub fn lut_split(&self) -> (f64, f64, f64)
The LUT split in % of the LUT budget: (SHA line, DSig foreground, Ed25519). The Ed25519 paper has no DSig part. Sums to 100.
Sourcepub fn switch_paper(&mut self)
pub fn switch_paper(&mut self)
Switch to the next paper this build has (papers,
wrapping around) and balance it.
Sourcepub fn write_config(&mut self)
pub fn write_config(&mut self)
Write the build flags of the current plan.
Auto Trait Implementations§
impl Freeze for App
impl !RefUnwindSafe for App
impl !Send for App
impl !Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl !UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more