I'm trying to understand the difference between the case where structs contain simple types vs. when they contain other structs. All guides/examples/... seem to use only basic types as fields and this works:
struct Something {
some: i32,
numbers: i32,
}
But this results in error:
struct Something {
reader: Reader,
writer: Writer,
}
On the current master: error: explicit lifetime bound required
So what's the solution here? Something
is constructed with both reader
and writer
and is returned from that function - reader
and writer
themselves are not copied anywhere else.