pub struct Envs { /* private fields */ }Expand description
The package managers found on this machine, the per-workspace state they keep, and what the user decided per workspace.
Implementations§
Source§impl Envs
impl Envs
Sourcepub fn detect(data_dir: Option<&Path>) -> Self
pub fn detect(data_dir: Option<&Path>) -> Self
Detect what this machine has. data_dir holds caches, installed packages and the
per-workspace answers; without it only the package managers’ CLIs are made to work
inside the sandbox.
Sourcepub fn new(data_dir: Option<&Path>, found: Found, mode: ProjectMode) -> Self
pub fn new(data_dir: Option<&Path>, found: Found, mode: ProjectMode) -> Self
Use exactly what found lists.
Sourcepub fn register(&mut self, id: &str, provider: Box<dyn EnvProvider>)
pub fn register(&mut self, id: &str, provider: Box<dyn EnvProvider>)
Add a provider (after byob’s own), switched on and off in chats by id like theirs
(an EnvPlan::providers whose off names it leaves it out).
Sourcepub fn installer(&self) -> Option<&'static str>
pub fn installer(&self) -> Option<&'static str>
The package manager install_packages uses here, if any.
Sourcepub fn containers(&self) -> Option<&Containers>
pub fn containers(&self) -> Option<&Containers>
Docker or Podman, if workspaces can run their commands in a container.
Sourcepub fn system(&self) -> Option<&SystemInstaller>
pub fn system(&self) -> Option<&SystemInstaller>
Homebrew or winget, if install_system_packages is offered.
Trait Implementations§
Source§impl EnvControl for Envs
impl EnvControl for Envs
Source§fn describe(&self, ws: &Path, plan: &EnvPlan) -> WorkspaceEnv
fn describe(&self, ws: &Path, plan: &EnvPlan) -> WorkspaceEnv
The settings and state of workspace
ws, whose settings say plan.Source§fn support(&self) -> EnvSupport
fn support(&self) -> EnvSupport
What this machine offers (Nix, a container runtime). Cheap.
Source§fn check_containers(&self) -> Result<String, String>
fn check_containers(&self) -> Result<String, String>
Whether the container runtime answers; the error says what to do. May take seconds.
Auto Trait Implementations§
impl !Freeze for Envs
impl !RefUnwindSafe for Envs
impl !UnwindSafe for Envs
impl Forget for Envs
impl Move for Envs
impl Send for Envs
impl Sync for Envs
impl Unpin for Envs
impl UnsafeUnpin for Envs
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
Mutably borrows from an owned value. Read more