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: SafeNameThe profile’s name, which is also its file name and part of every name it is built into.
harness: HarnessKindThe harness the profile runs.
template: TemplateThe 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: AccountKindWhat 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: MountAccessHow Assets/ is mounted.
network: NetworkModeWhat 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: OsThe 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
impl Profile
Sourcepub const CODE_MOUNT: MountAccess = MountAccess::ReadWrite
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.
Sourcepub fn image(&self) -> String
pub fn image(&self) -> String
The image the profile’s containers are started from, which follows from the name and is never stored twice.
Sourcepub fn parse(file: &str, text: &str) -> Loaded
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.
Sourcepub fn to_toml(&self) -> String
pub fn to_toml(&self) -> String
The definition file for this profile, as it is written to the store.
Sourcepub fn parts(&self) -> Vec<Extra>
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.
Sourcepub fn carries_high(&self) -> bool
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).
Sourcepub fn claude_plugins(&self) -> Vec<&'static str>
pub fn claude_plugins(&self) -> Vec<&'static str>
The Claude Code plugins this profile’s image gets, as claude plugin install takes them.
Sourcepub fn additions(&self) -> Vec<Addition>
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.
Sourcepub fn environment(&self) -> &'static [(&'static str, &'static str)]
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.
Sourcepub fn files(&self) -> Vec<ConfigFile>
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§
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for T
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<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