On Sun, Jul 21, 2013 at 12:44:24PM -0400, David Renshaw wrote:
> Hello everyone,
>
> I'm playing around with a Rust implementation for Cap'n Proto. Check
> it out: http://github.com/dwrensha/capnproto-rust . I welcome any
> comments or contributions.
>
> The reason I'm sharing this project with you now is I'd like to ask
> about a language feature missing from Rust that I feel may be
> hindering my progress.
>
> To the point, I want to be able define a trait like this:
>
> trait Constructable<'self> {
> fn construct<'a>(StructReader<'a>) -> Self<'a>;
> }
I believe it would it be possible to define the trait like so:
trait Constructable<'self> {
fn construct(StructReader<'self>) -> Self;
}
regards,
Niko
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev