Struct mycon::Config [−][src]
pub struct Config<'env> { /* fields omitted */ }
A container for program configuration.
This includes settings for debug output and how the program interacts with its environment via instructions for I/O and shell command execution.
Methods
impl<'env> Config<'env>
[src]
impl<'env> Config<'env>
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates a new Config
with default settings.
pub fn trace(self, trace: bool) -> Self
[src]
pub fn trace(self, trace: bool) -> Self
Sets whether executed commands should be traced.
pub fn trace_format(
self,
fmt_trace: impl FnMut(Trace) + 'static
) -> Self
[src]
pub fn trace_format(
self,
fmt_trace: impl FnMut(Trace) + 'static
) -> Self
Sets the function to format trace output.
pub fn sleep(self, sleep: Duration) -> Self
[src]
pub fn sleep(self, sleep: Duration) -> Self
Sets the duration to sleep after every instruction.
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 Config
.
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 Config
.
pub fn file_view(self, file_view: FileView) -> Self
[src]
pub fn file_view(self, file_view: FileView) -> Self
Sets the FileView
of the Config
.
pub fn exec_action(self, exec_action: ExecAction) -> Self
[src]
pub fn exec_action(self, exec_action: ExecAction) -> Self
Sets the ExecAction
of the Config
.