};
/// Describes how the streams of a [`Machine`](crate::Machine) will be handled.
+#[derive(Default)]
pub struct StreamConfig {
inner: StreamConfigInner,
}
-impl Default for StreamConfig {
- /// Defaults to using in-memory streams.
- fn default() -> Self {
- Self::in_memory()
- }
-}
-
impl StreamConfig {
/// Binds the input, output and error streams to stdin, stdout and stderr.
pub fn stdio() -> Self {
}
}
+#[derive(Default)]
enum StreamConfigInner {
Stdio,
+ #[default]
Memory,
}