Something like this
http://pcwalton.github.com/blog/2012/08/08/a-gentle-introduction-to-traits-in-rust/

On 23 October 2012 13:23, Henri Sivonen <hsivo...@iki.fi> wrote:
> On Tue, Oct 23, 2012 at 3:20 PM, Lucian Branescu
> <lucian.brane...@gmail.com> wrote:
>> I think it's possible to implement methods on a struct directly,
>> without a trait in between.
>
> This does not compile:
>
> struct Foo {
>   x: i32,
>   y: i32,
>   fn bar() {
>
>   },
> }
>
> --
> Henri Sivonen
> hsivo...@iki.fi
> http://hsivonen.iki.fi/
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to