What does the first explicit lifetime specifier on an impl mean?
问题 There are three different lifetime specifiers on an impl: impl<'a> Type<'a> { fn my_function(&self) -> &'a u32 { self.x } } Type<'a> states that there is a lifetime in this impl declaration. The one on the return type -> &'a u32 states that the variable that receives the return value should not die before...before what? Before the object of type Type dies? What's the difference to this: impl TextEditor { //Other methods omitted ... pub fn get_text<'a>(&'a self) -> &'a String { return &self