pub async fn response(controller: &mut Controller, arg: &str) -> StringExpand description
Returns help text for the given topic.
If no topic is provided (empty string), returns general help with an overview of all available commands. Otherwise, returns detailed help for the specified command.
§Arguments
controller- An authenticated controller connection (used to query available options for some commands)arg- The help topic (command name), or empty for general help
§Returns
Help text as a string. If the topic is not recognized, returns an error message.
§Example
use stem_rs::Controller;
use stem_rs::interpreter::help;
// General help
let help_text = help::response(&mut controller, "").await;
assert!(help_text.contains("/help"));
// Command-specific help
let signal_help = help::response(&mut controller, "SIGNAL").await;
assert!(signal_help.contains("NEWNYM"));
// Unknown topic
let unknown = help::response(&mut controller, "UNKNOWN").await;
assert!(unknown.contains("No help information"));