Is better method or function?


#1

Hi!
Sometimes I can implement some function as method or free function, and no mater which I choose it will work the same. In C++ I would choose free function, but I do not know which is better in Rust? Can you please explain to me which is better and why? Thanks for answers :smiley:


#2

The API guidelines has a brief section about this: C-METHOD.