From e93ea9ae1058334fc72b7795021bb42c1bd64401 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 3 Jun 2026 00:34:01 +0900 Subject: feat(io): add as_any downcast shims for IOInterface and OutputInterface Introduce the cross-cutting downcast base for PHP `instanceof` checks on io/output trait objects: `IOInterface::as_any` (ConsoleIO/NullIO/BufferIO) and `OutputInterface::as_console_output_interface` (promoting ConsoleOutput to a proper ConsoleOutputInterface). Wire the resolved downcasts in ConsoleIO error output, Auditor table format, and the event dispatcher. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/io/null_io.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/shirabe/src/io/null_io.rs') diff --git a/crates/shirabe/src/io/null_io.rs b/crates/shirabe/src/io/null_io.rs index b0e11f1..85a5fa5 100644 --- a/crates/shirabe/src/io/null_io.rs +++ b/crates/shirabe/src/io/null_io.rs @@ -138,7 +138,11 @@ impl IOInterfaceMutable for NullIO { } } -impl IOInterface for NullIO {} +impl IOInterface for NullIO { + fn as_any(&self) -> &dyn std::any::Any { + self + } +} impl BaseIO for NullIO { fn authentications( -- cgit v1.3.1