Vague about service life
I have a type structure SCGI
that has a property Netstring
that itself is another structure:
struct SCGI<'a> { content_length:uint, scgi:bool, request_method:RequestMethod, request_uri:&'a str, body:&'a str, original:Netstring } impl<'a> SCGI<'a> { … }
If this was C ++ I would like it to Netstring
be a new object, not a reference to another object. But if I try to build my code, I always get the following error:
error: wrong number of time-to-live parameters: expected 1, found 0
Adding the lifetime to original
doesn't help: it original:&'a Netstring
leads to the same error.
What am I missing here?
+3
source to share
1 answer