pub struct Loadout {
pub provider: Option<String>,
pub model: Option<String>,
pub kit: Option<String>,
pub profile: Option<String>,
pub role: Option<String>,
pub settings: Option<LoadoutSettings>,
}Expand description
One named loadout ([loadouts.<name>] / ~/.newt/loadouts/<name>.toml) — the
top-level composition the user loads (docs/design/loadout-composition.md).
Every field is optional and is a name reference into the surface that owns
that axis; the loadout itself stores nothing but the selection + per-axis
overrides. It carries no authority — settings cannot widen caveats.
[loadouts.dev-nemotron]
provider = "dgx" # → the catalog/provider card (#387)
model = "nemotron@deep"
kit = "nemotron" # → a [bundles.<name>] (the loadable kit unit)
profile = "nemotron" # → a [profiles.<name>] (optional; the bundle implies it)
role = "python-developer" # → ~/.newt/personas/<name>.md
[loadouts.dev-nemotron.settings]
num_ctx = 24576
framing = "Ship small, verify."Fields§
§provider: Option<String>Provider id (→ the catalog/provider card). Resolution is Slice 2.
model: Option<String>Model id, optionally model@variant. Resolution is Slice 2.
kit: Option<String>Bundle name (the loadable kit unit) — must name a [bundles.<name>].
profile: Option<String>Profile name — must name a [profiles.<name>]. Omitted ⇒ the bundle/model
implies it.
role: Option<String>Role/persona name (~/.newt/personas/<name>.md). Not validated against the
filesystem here — personas are resolved at session start.
settings: Option<LoadoutSettings>Per-axis overrides (parameters / prompt). Never authority.
Implementations§
Source§impl Loadout
impl Loadout
Sourcepub fn validate(&self, cfg: &Config) -> Result<(), String>
pub fn validate(&self, cfg: &Config) -> Result<(), String>
Validate the loadout’s name references against cfg: a named kit must be a
known bundle, a named profile must be a known, valid profile, and a named
provider must name a [backends] entry (Slice 2 — the provider/model axis).
A dangling reference is a hard error — a loadout that silently did nothing
would be a false claim. The @variant half of model and role are resolved
by their own surfaces later and are not checked here.
§Errors
The first dangling kit, profile, or provider reference, as a message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Loadout
impl<'de> Deserialize<'de> for Loadout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Loadout
impl StructuralPartialEq for Loadout
Auto Trait Implementations§
impl Freeze for Loadout
impl RefUnwindSafe for Loadout
impl Send for Loadout
impl Sync for Loadout
impl Unpin for Loadout
impl UnsafeUnpin for Loadout
impl UnwindSafe for Loadout
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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