aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/plugin/capability/command_provider.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/plugin/capability/command_provider.rs')
-rw-r--r--crates/shirabe/src/plugin/capability/command_provider.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/shirabe/src/plugin/capability/command_provider.rs b/crates/shirabe/src/plugin/capability/command_provider.rs
index 6d6f6cf1..2453860a 100644
--- a/crates/shirabe/src/plugin/capability/command_provider.rs
+++ b/crates/shirabe/src/plugin/capability/command_provider.rs
@@ -1,9 +1,13 @@
//! ref: composer/src/Composer/Plugin/Capability/CommandProvider.php
-// TODO(plugin): Commands Provider Interface. Plugins implementing this capability provide a list of commands.
use crate::command::BaseCommand;
use crate::plugin::capability::Capability;
+/// Commands Provider Interface. Plugins implementing this capability provide a list of
+/// commands.
+///
+/// The sole implementor is the PHP capability proxy (Composer itself never implements a
+/// capability), so the method is fallible: the answer crosses the RPC boundary.
pub trait CommandProvider: Capability {
- fn get_commands(&self) -> Vec<Box<dyn BaseCommand>>;
+ fn get_commands(&self) -> anyhow::Result<Vec<Box<dyn BaseCommand>>>;
}