diff options
Diffstat (limited to 'crates/shirabe/src/io')
| -rw-r--r-- | crates/shirabe/src/io/console_io.rs | 17 | ||||
| -rw-r--r-- | crates/shirabe/src/io/null_io.rs | 16 |
2 files changed, 31 insertions, 2 deletions
diff --git a/crates/shirabe/src/io/console_io.rs b/crates/shirabe/src/io/console_io.rs index 0794ca5..f2c09ac 100644 --- a/crates/shirabe/src/io/console_io.rs +++ b/crates/shirabe/src/io/console_io.rs @@ -24,7 +24,8 @@ use crate::util::silencer::Silencer; /// The Input/Output helper. #[derive(Debug)] pub struct ConsoleIO { - pub(crate) inner: BaseIO, + authentications: index::IndexMap<String, indexmap::IndexMap<String, Option<String>>>, + pub(crate) input: Box<dyn InputInterface>, pub(crate) output: Box<dyn OutputInterface>, pub(crate) helper_set: HelperSet, @@ -567,3 +568,17 @@ impl ConsoleIO { } } } + +impl BaseIO for ConsoleIO { + fn authentications( + &self, + ) -> &indexmap::IndexMap<String, indexmap::IndexMap<String, Option<String>>> { + &self.authentications + } + + fn authentications_mut( + &mut self, + ) -> &mut indexmap::IndexMap<String, indexmap::IndexMap<String, Option<String>>> { + &mut self.authentications + } +} diff --git a/crates/shirabe/src/io/null_io.rs b/crates/shirabe/src/io/null_io.rs index 4218398..af0296d 100644 --- a/crates/shirabe/src/io/null_io.rs +++ b/crates/shirabe/src/io/null_io.rs @@ -6,7 +6,7 @@ use shirabe_php_shim::PhpMixed; #[derive(Debug)] pub struct NullIO { - inner: BaseIO, + authentications: index::IndexMap<String, indexmap::IndexMap<String, Option<String>>>, } impl IOInterface for NullIO { @@ -79,3 +79,17 @@ impl IOInterface for NullIO { default } } + +impl BaseIO for NullIO { + fn authentications( + &self, + ) -> &indexmap::IndexMap<String, indexmap::IndexMap<String, Option<String>>> { + &self.authentications + } + + fn authentications_mut( + &mut self, + ) -> &mut indexmap::IndexMap<String, indexmap::IndexMap<String, Option<String>>> { + &mut self.authentications + } +} |
