MCPcopy Create free account
hub / github.com/AI45Lab/Code / list_full

Method list_full

core/src/commands.rs:191–205  ·  view source on GitHub ↗

Get all registered commands with name, description, and optional usage hint.

(&self)

Source from the content-addressed store, hash-verified

189
190 /// Get all registered commands with name, description, and optional usage hint.
191 pub fn list_full(&self) -> Vec<(String, String, Option<String>)> {
192 let mut cmds: Vec<_> = self
193 .commands
194 .values()
195 .map(|c| {
196 (
197 c.name().to_string(),
198 c.description().to_string(),
199 c.usage().map(|s| s.to_string()),
200 )
201 })
202 .collect();
203 cmds.sort_by(|a, b| a.0.cmp(&b.0));
204 cmds
205 }
206
207 /// Number of registered commands.
208 pub fn len(&self) -> usize {

Callers 2

list_commandsMethod · 0.80
list_commandsMethod · 0.80

Calls 3

nameMethod · 0.45
descriptionMethod · 0.45
usageMethod · 0.45

Tested by

no test coverage detected