News for hackers. Stuff that matters.
Re:Virtual Structs Part 1: Where Rust’s Enum Shines by losvedir on Tuesday May 05, 2015 @02:33PM (#9494099)
> If I dereference a Box<CanineTrait> and call "bark," how is the correct implementation found at runtime? Is there a vtable or something analogous?

I think a vtable. It's my understanding that "trait objects" (boxed traits) are how you implement dynamic dispatch in rust. If instead you were talking about a `fn foo<T: CanineTrait>(x: T) { ... }` trait bound (the more common case), there will be monomorphization and static dispatch.

Source: http://doc.rust-lang.org/1.0.0-beta/book/static-and-dynamic-...

Re:Virtual Structs Part 1: Where Rust’s Enum Shines by steveklabnik on Tuesday May 05, 2015 @02:42PM (#9494164)
After the beta landed, I re-did the TOC for the book, and so this information will be at http://doc.rust-lang.org/nightly/book/trait-objects.html in the future. (where nightly = 1.0.0, of course)