pub struct Containers {
pub runtime: Runtime,
pub default_image: String,
/* private fields */
}Expand description
The containers of all workspaces, through one runtime.
Fields§
§runtime: Runtime§default_image: StringImplementations§
Source§impl Containers
impl Containers
pub fn new(runtime: Runtime, default_image: Option<String>) -> Self
Sourcepub fn state(&self, ws: &Path) -> Option<String>
pub fn state(&self, ws: &Path) -> Option<String>
The container’s state (“running”, “exited”, …), None if there is none (or the
daemon doesn’t answer).
pub fn stop(&self, ws: &Path) -> Result<String, String>
pub fn remove(&self, ws: &Path) -> Result<String, String>
Sourcepub fn ensure(
&self,
ws: &Path,
spec: &Spec,
tmp_base: &Path,
cancelled: &dyn Fn() -> bool,
) -> Result<Ready, String>
pub fn ensure( &self, ws: &Path, spec: &Spec, tmp_base: &Path, cancelled: &dyn Fn() -> bool, ) -> Result<Ready, String>
The workspace’s container, created or started as needed. tmp_base is the folder
for per-run temp folders (in byob’s data folder).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Containers
impl Forget for Containers
impl RefUnwindSafe for Containers
impl Send for Containers
impl Sync for Containers
impl Unpin for Containers
impl UnsafeUnpin for Containers
impl UnwindSafe for Containers
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