I'm having issues getting the lifetimes correct (again...) for a trait implementation.
There's a postgres Row which I'd like to make convertible into my own structure like this:
impl<'a> From<&'a Row> for Video {
fn from(row: &Row) -> Video {
Video {
video_id: row.get("video_id"),
...
}
}
}
But I get an error like this:
src/entities.rs:46:19: 46:22 error: wrong number of lifetime parameters: expected 1, found 0 [E0107]
src/entities.rs:46 impl<'a> From<&'a Row> for Video {
^~~
which doesn't make sense to me - the lifetime param is right there. What's missing?