diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-26 20:04:02 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-26 20:04:02 +0900 |
| commit | f411daceacad66e0bd774fda7d3c5ef8533cc55c (patch) | |
| tree | eefb065e4d676a3f7031ca49bab21c773b00b134 /crates/shirabe/src/io/null_io.rs | |
| parent | 1921f173ea219cb4b25847294d2d3fa465550fbb (diff) | |
| download | php-shirabe-f411daceacad66e0bd774fda7d3c5ef8533cc55c.tar.gz php-shirabe-f411daceacad66e0bd774fda7d3c5ef8533cc55c.tar.zst php-shirabe-f411daceacad66e0bd774fda7d3c5ef8533cc55c.zip | |
refactor(io): share IOInterface via Rc<RefCell<dyn _>> handle
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/io/null_io.rs')
| -rw-r--r-- | crates/shirabe/src/io/null_io.rs | 59 |
1 files changed, 19 insertions, 40 deletions
diff --git a/crates/shirabe/src/io/null_io.rs b/crates/shirabe/src/io/null_io.rs index e3cfdcf..b0e11f1 100644 --- a/crates/shirabe/src/io/null_io.rs +++ b/crates/shirabe/src/io/null_io.rs @@ -2,7 +2,8 @@ use crate::io::BaseIO; use crate::io::IOInterface; -use shirabe_external_packages::psr::log::LoggerInterface; +use crate::io::IOInterfaceImmutable; +use crate::io::IOInterfaceMutable; use shirabe_php_shim::PhpMixed; #[derive(Debug)] @@ -18,7 +19,7 @@ impl NullIO { } } -impl IOInterface for NullIO { +impl IOInterfaceImmutable for NullIO { fn is_interactive(&self) -> bool { false } @@ -109,6 +110,20 @@ impl IOInterface for NullIO { <Self as BaseIO>::get_authentication(self, repository_name) } + fn error(&self, _message: &str, _context: &[(&str, &str)]) { + todo!() + } + + fn warning(&self, _message: &str, _context: &[(&str, &str)]) { + todo!() + } + + fn debug(&self, _message: &str, _context: &[(&str, &str)]) { + todo!() + } +} + +impl IOInterfaceMutable for NullIO { fn set_authentication( &mut self, repository_name: String, @@ -123,6 +138,8 @@ impl IOInterface for NullIO { } } +impl IOInterface for NullIO {} + impl BaseIO for NullIO { fn authentications( &self, @@ -136,41 +153,3 @@ impl BaseIO for NullIO { &mut self.authentications } } - -impl LoggerInterface for NullIO { - fn emergency(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn alert(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn critical(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn error(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn warning(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn notice(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn info(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn debug(&self, message: &str, context: &[(&str, &str)]) { - todo!() - } - - fn log(&self, level: &str, message: &str, context: &[(&str, &str)]) { - todo!() - } -} |
