//! ref: composer/vendor/symfony/console/Descriptor/DescriptorInterface.php use crate::application::Application; use crate::command::Command; use crate::input::InputArgument; use crate::input::InputDefinition; use crate::input::InputOption; use crate::output::OutputInterface; use indexmap::IndexMap; use shirabe_php_shim::PhpMixed; /// The set of objects the descriptors know how to describe. pub enum DescribableObject { InputArgument(InputArgument), InputOption(InputOption), InputDefinition(InputDefinition), Command(std::rc::Rc>), Application(std::rc::Rc>), } /// Descriptor interface. pub trait DescriptorInterface { fn describe( &mut self, output: std::rc::Rc>, object: DescribableObject, options: IndexMap, ) -> anyhow::Result<()>; }