pub struct SecondarySlotStatus {
pub state: &'static str,
pub detail: String,
}Expand description
Why the second VRAM slot is or is not in use.
Fields§
§state: &'static strStable machine-readable label, for styling. One of resident,
available, too_large, no_headroom, unknown_footprint,
unknown_budget.
A &'static str, which ts-rs would render as a bare string — losing
the exhaustiveness the GUI’s icon table and tone function are written
against. The override restates the closed set above, the same way
gglib_proxy::dashboard::CacheStatus::ram_state does.
Three places set it, and all three must stay inside that set:
Self::default and Self::resident each write one literal, and
Self::from_decision takes SecondarySlotDecision::label for every
refusal. label also answers "grant", which never reaches here —
from_decision maps a grant to "available" before consulting it.
detail: StringReady-to-render explanation. Phrased for display rather than parsing —
consumers branch on Self::state.
Implementations§
Source§impl SecondarySlotStatus
impl SecondarySlotStatus
Sourcepub fn resident(model_name: &str) -> Self
pub fn resident(model_name: &str) -> Self
The status for a slot that currently holds model_name.
Sourcepub fn from_decision(decision: SecondarySlotDecision) -> Self
pub fn from_decision(decision: SecondarySlotDecision) -> Self
Render the most recent refusal as a status.
A SecondarySlotDecision::Grant reaching here means the co-load was
attempted but has not completed (or failed at spawn); it reports as
available rather than resident, since nothing is loaded.
Trait Implementations§
Source§impl Clone for SecondarySlotStatus
impl Clone for SecondarySlotStatus
Source§fn clone(&self) -> SecondarySlotStatus
fn clone(&self) -> SecondarySlotStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecondarySlotStatus
impl Debug for SecondarySlotStatus
Source§impl Default for SecondarySlotStatus
impl Default for SecondarySlotStatus
Source§impl PartialEq for SecondarySlotStatus
impl PartialEq for SecondarySlotStatus
Source§fn eq(&self, other: &SecondarySlotStatus) -> bool
fn eq(&self, other: &SecondarySlotStatus) -> bool
self and other values to be equal, and is used by ==.