pub struct Layout { /* private fields */ }Expand description
The session’s workspace: the one coordinate, and the model of the files in it. Construction proves what every user needs: the directory exists (canonical), and is one line of text — it crosses into bash. Handed to every reaction at construction, since the instrument’s own frames name a file in here.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn text(&self) -> &str
pub fn text(&self) -> &str
The workspace as text — what a rig splices into its bash, spelled
through bash_strings::emit_scalar.
Sourcepub fn bash_env(
&self,
provision: Provision<'_>,
) -> Result<(OsString, OsString), Failure>
pub fn bash_env( &self, provision: Provision<'_>, ) -> Result<(OsString, OsString), Failure>
The one owner of <dir>/bash_env.bash: writes it — the two sources,
then the joining line iff provisioned — and yields the
("BASH_ENV", <file>) pair. Every non-interactive bash in the tree
the subject creates sources that file as it starts; whether that
initiates the channel is provision, stated by the caller. The core
consults neither this pair nor any other: a run’s environment is
whatever its closure returns.