pub struct NewPane {
pub cwd: String,
pub command: Option<String>,
pub env: Vec<(String, String)>,
pub title: Option<String>,
}Expand description
A pane to open: its directory (a project root of this machine or a directory inside one), its command (the user’s shell when none) and variables on top of its login environment.
ⓘ
let pane = NewPane::new("/work/app/web")
.command("pnpm dev")
.env("PORT", "4000")
.create()?;Fields§
§cwd: String§command: Option<String>§env: Vec<(String, String)>§title: Option<String>The pane’s title; the plugin’s id when none.
Implementations§
Source§impl NewPane
impl NewPane
pub fn new(cwd: &str) -> Self
pub fn command(self, command: &str) -> Self
Sourcepub fn env(self, name: &str, value: &str) -> Self
pub fn env(self, name: &str, value: &str) -> Self
Sets one variable (at most 64; a name is not empty and has no
=).
Trait Implementations§
impl Eq for NewPane
impl StructuralPartialEq for NewPane
Auto Trait Implementations§
impl Freeze for NewPane
impl RefUnwindSafe for NewPane
impl Send for NewPane
impl Sync for NewPane
impl Unpin for NewPane
impl UnsafeUnpin for NewPane
impl UnwindSafe for NewPane
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