These are chat archives for rust-lang/rust

Jul 2017
Alex Burka
Jul 12 2017 05:35
@lancecarlson when implementing a trait you can only implement the methods listed in the trait
Alexander Ronald Altman
Jul 12 2017 07:06
But since From only provides one method, you can just use a local function.
Lance Carlson
Jul 12 2017 15:20
@durka Thanks!
@pthariensflame hmm, local as in a function I impl directly on the struct or can I define more private methods with in the From?
ah or a function I guess I define outside the scope of any of those but still in the same "mod"
Daan Rijks
Jul 12 2017 15:32
@lancecarlson You can do all of those things, but you can also nest function definitions within other functions:
Lance Carlson
Jul 12 2017 15:33
@ijks ahh! nice :)