Struct mycon::Environment [−][src]
pub struct Environment<'env> { /* fields omitted */ }
Tracks information on how the program interacts with its environment.
An Environment
keeps track of where input should be read, where output
should be written, what files the program may access and how to locate them,
and how to react when it tries to execute a shell command.
This API will soon be overhauled to provide a cleaner and more expressive interface.
Methods
impl<'env> Environment<'env>
[src]
impl<'env> Environment<'env>
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates a new Environment
referencing the standard input and output.
The Environment
will give the program full access to the file system
and allow it to execute shell commands.
pub fn input(
self,
input: &'env mut impl BufRead
) -> Self
[src]
pub fn input(
self,
input: &'env mut impl BufRead
) -> Self
Sets the input stream of the Environment
.
pub fn output(
self,
output: &'env mut impl Write
) -> Self
[src]
pub fn output(
self,
output: &'env mut impl Write
) -> Self
Sets the output stream of the Environment
.
pub fn file_view(self, file_view: FileView) -> Self
[src]
pub fn file_view(self, file_view: FileView) -> Self
Sets the FileView
of the Environment
.
pub fn exec_action(self, exec_action: ExecAction) -> Self
[src]
pub fn exec_action(self, exec_action: ExecAction) -> Self
Sets the ExecAction
of the Environment
.
Auto Trait Implementations
impl<'env> !Send for Environment<'env>
impl<'env> !Send for Environment<'env>
impl<'env> !Sync for Environment<'env>
impl<'env> !Sync for Environment<'env>