Skip to main content

Template

Enum Template 

Source
pub enum Template {
    Base,
    Recommended,
    High,
    QuvytaDev,
    Slim,
    Custom,
}
Expand description

A ready-made set of the parts a profile’s image is built with, or the person’s own set of them.

No set decides whether the harness asks for permission: it never does, under any of them, because the container is what keeps the work apart from the machine.

Variants§

§

Base

The harness as it comes: the image holds no part of ours. A file on disk that names no template, or names this one, is read as this.

§

Recommended

The harness set up the way its makers and QCode recommend, with graphify beside it and the harness’s own recommended plugins: “QCode recommended”. The id is older than the name, and stays, because profiles on disk are written with it.

§

High

QCode recommended, and every other tool the owner of QCode works with installed beside the harness, with instructions written into the workspace so its agents can reach each other: “QCode extra”. The id high is what the template was called before, and stays, because profiles on disk are written with it. See Addition.

§

QuvytaDev

QCode extra, and what building the Quvyta ecosystem’s Rust terminal apps inside the container needs: “Quvyta development”. See Addition::Rust and Addition::Chromium.

§

Slim

opencode with oh-my-opencode-slim, the lighter team of agents, and graphify beside it, on the settings, first-start answers and update switches every QCode set writes: “oh my opencode slim”. It never carries oh-my-openagent. Offered to opencode alone (Template::offered); a definition written by hand for another harness gets graphify.

§

Custom

The parts the person chose one by one: “Custom”. Its file names what it goes without out of the whole list its harness can have (Template::available).

Only a set no older QCode could build is written under it (Template::written_as), and in a folder of its own that an older QCode does not read.

Implementations§

Source§

impl Template

Source

pub const ALL: [Self; 6]

Every template a definition file can name, in the order the picker offers them: the four ready-made sets, then Custom. Template::Base is in the list because profiles on disk are written with it, though the picker never offers it.

Source

pub fn offered(harness: HarnessKind) -> Vec<Self>

The rows the template page’s picker offers a profile of harness: the ready-made sets, in order, and Custom last. oh my opencode slim is opencode’s alone, since the team of agents it is for is opencode’s.

Source

pub fn id(self) -> &'static str

How the template is written in definition files.

Source

pub fn carries_high(self) -> bool

Whether the template carries everything QCode extra gives: QCode extra itself, and Quvyta development, which is QCode extra and more. What QCode extra does beyond the image — its instructions written into the workspace — follows from this, not from one name.

A set of the person’s own does not carry them, even when it holds every part QCode extra holds: opencode’s QCode extra and QCode recommended install the same parts, so nothing in a set of parts can say which of the two was meant. It gets what QCode recommended gives.

Source

pub fn parse(id: &str) -> Option<Self>

The template written as id, if there is one.

Source

pub fn plain_files(harness: HarnessKind) -> Vec<ConfigFile>

The harness’s settings and first-start answers from its record, naming no plugin: what the “recommended settings” part writes for a harness whose plugin is off.

Source

pub fn maker_switches( harness: HarnessKind, ) -> &'static [(&'static str, &'static str)]

The variables the “recommended settings” part sets in the image for harness: the maker’s switches for its own update check and usage reports, where the harness offers them as variables rather than as keys of its settings file (those are in the file itself).

An update the harness installs by itself would change the image’s program under the person’s feet, inside a container that is remade from the image anyway; a rebuild is how an update arrives. Every name was read in the harness’s own package: Claude Code 2.1.281 lists all three among the variables it reads; opencode 1.18.32 returns from its update check when OPENCODE_DISABLE_AUTOUPDATE is set; Kimi Code CLI 2.1.1 reads KIMI_DISABLE_TELEMETRY for its usage reports and KIMI_CODE_NO_AUTO_UPDATE for “no check, no background install, no prompt”.

Source

pub fn claude_plugins(self) -> &'static [&'static str]

The Claude Code plugins the template installs, as claude plugin install takes them: the five of CLAUDE_STARTER_PLUGINS under QCode recommended, CLAUDE_EXTRA_PLUGINS under QCode extra, every one of CLAUDE_PLUGINS under Quvyta development, none under base.

Source

pub fn available(harness: HarnessKind) -> Vec<Extra>

Every part a profile of harness can have switched on, in the order the wizard lists them: graphify, the plugins of the harness that has them, the teams of agents opencode has, the Rust toolchain and the browser, and the recommended settings.

This is what the page lists, whatever the picker reads: choosing a ready-made set is a way of switching these on, not a shorter list of them. Which of them an image can really carry is the harness’s business; the system refuses Chromium on its own (crate::base::Os).

Source

pub fn parts(self, harness: HarnessKind) -> Vec<Extra>

The parts this template switches on for a profile of harness, in the order the wizard lists them: the ready-made set the template stands for, or, for Template::Custom, the whole list its harness can have.

A custom profile is a list of its own rather than a set, so what it carries is this minus what its file goes without (crate::profile::Profile::parts is the whole of it). The empty set of “the harness as it comes” is a list of everything switched off, so Template::Base — the id older files were written with — has no parts at all.

Source

pub fn written_as(parts: &[Extra], harness: HarnessKind) -> Self

The template a definition file names for a profile of harness whose parts are exactly parts, which the file’s off-list then narrows down to them.

The harness as it comes, every part off, is Template::Base. Otherwise the first ready-made set, in the picker’s order, that holds every one of parts and differs from them only by parts an older QCode can leave out too (Extra::older_can_leave_out): such a file builds the same image under every QCode that reads it. Only a set that is no ready- made set narrowed down that way is Template::Custom.

Trait Implementations§

Source§

impl Clone for Template

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Template

Source§

impl Debug for Template

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Template

Source§

impl PartialEq for Template

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Template

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.