pub struct Spec {
pub image: Image,
pub env: Vec<(String, String)>,
pub remote_env: Vec<(String, String)>,
pub on_create: Vec<Cmd>,
pub ignored: Vec<String>,
pub file: Option<&'static str>,
}Expand description
How to make and use one workspace’s container.
Fields§
§image: Image§env: Vec<(String, String)>Set on the container (containerEnv).
remote_env: Vec<(String, String)>Set for each command (remoteEnv).
on_create: Vec<Cmd>Run once after creation, in order.
ignored: Vec<String>devcontainer.json keys byob doesn’t support.
file: Option<&'static str>The devcontainer.json it came from (workspace-relative), if any.
Implementations§
Source§impl Spec
impl Spec
Sourcepub fn default_image(image: &str) -> Self
pub fn default_image(image: &str) -> Self
The default container: image, nothing else.
Sourcepub fn for_workspace(ws: &Path, default_image: &str) -> Result<Self, String>
pub fn for_workspace(ws: &Path, default_image: &str) -> Result<Self, String>
For workspace ws: its devcontainer.json if it has one, else default_image.
Trait Implementations§
impl Eq for Spec
impl StructuralPartialEq for Spec
Auto Trait Implementations§
impl Forget for Spec
impl Freeze for Spec
impl Move for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
impl UnwindSafe for Spec
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