Skip to main content

Profile

Struct Profile 

Source
pub struct Profile {
    pub name: SafeName,
    pub harness: HarnessKind,
    pub template: Template,
    pub account: AccountKind,
    pub provider: Option<ProviderChoice>,
    pub assets: MountAccess,
    pub network: NetworkMode,
    pub without: Vec<Extra>,
    pub os: Os,
}
Expand description

A profile as its definition file describes it.

Fields§

§name: SafeName

The profile’s name, which is also its file name and part of every name it is built into.

§harness: HarnessKind

The harness the profile runs.

§template: Template

The set of parts the image is built with, which for a ready-made one is also what the person chose from a list (Template::parts); Template::Custom means the file names the parts it goes without out of the whole list (Template::available). An id this QCode does not know is refused rather than read as the harness as it comes, which would build an image the file never asked for.

§account: AccountKind

What the profile signs in with.

§provider: Option<ProviderChoice>

The provider and what this profile runs on, when Profile::account is AccountKind::Provider; None otherwise.

§assets: MountAccess

How Assets/ is mounted.

§network: NetworkMode

What the container may reach.

§without: Vec<Extra>

The parts the image is built without. A file names only what it goes without, so a profile that names nothing has everything, which is also how every file written before the choice existed reads. For a ready-made set that is the parts it does not switch on; for a Template::Custom profile it is the parts of the whole list its harness can have (Template::available) that it does not carry.

§os: Os

The system the profile’s image is built on. Debian, which every profile was built on before there was a choice, is what a file that names none reads as.

Implementations§

Source§

impl Profile

Source

pub const CODE_MOUNT: MountAccess = MountAccess::ReadWrite

How Work/ is mounted. The workspace’s own directory is what the harness is there to work on, so it is writable in every profile and the file carries the choice only to be readable.

Source

pub fn image(&self) -> String

The image the profile’s containers are started from, which follows from the name and is never stored twice.

Source

pub fn parse(file: &str, text: &str) -> Loaded

Reads a definition file. Nothing here panics and nothing stops at the first mistake: a value the file cannot mean is reported with its line and column and replaced by the default, and only a name, a harness or an account that cannot be made sense of leaves the file without a profile.

Source

pub fn to_toml(&self) -> String

The definition file for this profile, as it is written to the store.

Source

pub fn has(&self, extra: Extra) -> bool

Whether this profile’s image carries extra.

Source

pub fn parts(&self) -> Vec<Extra>

The parts this profile’s image carries, in the order the wizard lists them: what its set has, less what the person switched off.

The two teams of agents opencode has exclude each other here as they do on the page, since a container runs one of them and its settings can name only one: a file written by hand that asks for both is read as the one the wizard’s own list puts last, so that the settings and the build agree.

Source

pub fn carries_high(&self) -> bool

Whether the workspace gets QCode extra’s instructions, which QCode extra and Quvyta development promise and a set of the person’s own does not (Template::carries_high).

Source

pub fn claude_plugins(&self) -> Vec<&'static str>

The Claude Code plugins this profile’s image gets, as claude plugin install takes them.

Source

pub fn additions(&self) -> Vec<Addition>

What this profile’s image gets beside the harness, in the order it is installed. The Claude Code plugins are one addition, there while any one of them is on.

Source

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

The variables the image sets for the harness’s own maker: what the “recommended settings” part brings, and nothing at all without it.

Source

pub fn files(&self) -> Vec<ConfigFile>

The configuration files this profile’s image build writes, in the order they are written: nothing at all without the “recommended settings” part, and otherwise the harness’s own settings and its answers to its first-start questions. opencode’s settings name the team of agents it has, by the path npm installed it to in the image, because a plugin opencode is not told about is a plugin it never loads.

Trait Implementations§

Source§

impl Clone for Profile

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 Debug for Profile

Source§

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

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

impl Eq for Profile

Source§

impl PartialEq for Profile

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 Profile

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.