enum Source<'self> {
String(&'self str),
ReaderUtil(&'self ReaderUtil)
}
pub struct Matrix<'self> {
source: &'self Source<'self>
}
fn main() {
}
You declared your enum Source with a lifetime parameter, enum Source<'self>
. That means you also have to declare the lifetime for Source in Matrix.