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 Specwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
PhantomData<(String, String)>: Freeze,
PhantomData<Cmd>: Freeze,
PhantomData<String>: Freeze,
&'static str: Freeze,
impl Move for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Specwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<Cmd>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
&'static str: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.