This seems like a mistake.
This signature:
fn command(self: &mut GitConnect, command: &str) -> Result<Vec<Vec<u8>>, &str>
in accordance with the rules of the life cycle , should be equivalent to this:
fn command<'a, 'b>(self: &'a mut GitConnect, command: &'b str) -> Result<Vec<Vec<u8>>, &'a str>
And in fact, if you rewrite your own command()to use this advanced option, it should compile. Also, if you use an abbreviated definition of the argument self:
fn command(&mut self, command: &str) -> Result<Vec<Vec<u8>>, &str>
then it also compiles.
It seems that now
fn command(self: &mut GitConnect, command: &str) -> Result<Vec<Vec<u8>>, &str>
equivalently
fn command<'a>(self: &'a mut GitConnect, command: &'a str) -> Result<Vec<Vec<u8>>, &'a str>
, : command , self, , self.