pub fn help_string(&self, w: &mut dyn Write, opt_cmds: Option<&[&str]>) -> Result<(), Error> {
        match opt_cmds {
            Some(cmds) => {
                for name in cmds {
                    if let Some(cmd) = self.find_by_name(name) {
                        cmd.append_help_string(w, 0);
                    } else {
                        return Err(Error::CommandNotFound(name.to_string()));
                    }
                }
            }
            None => {
                for c in &self.registered_commands {
                    c.append_help_string(w, 0);
                }
            }
        }
        Ok(())
    }
// Generate and return the help string.
Generate and return the help string.
Generate and return the help string .
pub fn help_string(&self, w: &mut dyn Write, opt_cmds: Option<&[&str]>) -> Result<(), Error> {
        match opt_cmds {
            Some(cmds) => {
                for name in cmds {
                    if let Some(cmd) = self.find_by_name(name) {
                        cmd.append_help_string(w, 0);
                    } else {
                        return Err(Error::CommandNotFound(name.to_string()));
                    }
                }
            }
            None => {
                for c in &self.registered_commands {
                    c.append_help_string(w, 0);
                }
            }
        }
        Ok(())
    }
pub fn help_string ( & self , w : & mut dyn Write , opt_cmds : Option < & [ & str ] > ) -> Result < ( ) , Error > { match opt_cmds { Some ( cmds ) => { for name in cmds { if let Some ( cmd ) = self . find_by_name ( name ) { cmd . append_help_string ( w , 0 ) ; } else { return Err ( Error :: CommandNotFound ( name . to_string ( ) ) ) ; } } } None => { for c in & self . registered_commands { c . append_help_string ( w , 0 ) ; } } } Ok ( ( ) ) }
Generate and return the help string.
Generate and return the help string .
&self
w
&mut dyn Write
opt_cmds
Option<&[&str]>
&self
w
&mut dyn Write
opt_cmds
Option<&[&str]>