From d7ca93a8c492e38e19b489457fc534dd5d5543bc Mon Sep 17 00:00:00 2001 From: imunproductive Date: Fri, 25 Apr 2025 03:56:44 +0000 Subject: [PATCH] extend subcommands provider api --- lib/clientele/src/subcommands.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/clientele/src/subcommands.rs b/lib/clientele/src/subcommands.rs index 812082e..686e51e 100644 --- a/lib/clientele/src/subcommands.rs +++ b/lib/clientele/src/subcommands.rs @@ -48,6 +48,18 @@ impl SubcommandsProvider { pub fn iter(&self) -> impl Iterator { self.commands.iter() } + + pub fn into_iter(self) -> impl Iterator { + self.commands.into_iter() + } + + pub fn get_commands(&self) -> &Vec { + &self.commands + } + + pub fn into_commands(self) -> Vec { + self.commands + } } #[cfg(unix)]