On 2014-05-30, at 3:42, Eric Reed <[email protected]> wrote:

> Rust *does* have function overloading. That's *exactly* what traits are for.
> If you want to overload a function, then make it a trait and impl the trait 
> for all the types you want to overload it with.

I've been trying to figure out how exactly to do this. How would I write a 
function that's overloaded based on whether its argument's type implements 
Iterator or RandomAccessIterator?

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to