Hi Folks
I am having an issue with traits. Here is some code:
pub struct Foo <'a>{
foo: &'a str
}
pub trait Bar {
fn baz() -> Something;
}
impl <'a> Bar for Foo <'a> {
fn baz() -> Something {
// some legit code here
}
}
(I have encapsulated some code, so kindly ignore any syntax or formatting issues)
But i get the error:
error[E0599]: no method named
baz
found for typeFoo<'_>
in the current scope
Any ideas?