Re:Should small Rust structs be passed by-copy or by-borrow?
by shmerl on Monday August 26, 2019 @03:04PM
(#20802686)
Does that essentially overload + for it?
[ Parent
| on HN ]
Re:Should small Rust structs be passed by-copy or by-borrow?
by saghm on Monday August 26, 2019 @04:11PM
(#20803248)
Yes; Rust uses traits to implement behavior for operators on custom types (see the full list here: https://doc.rust-lang.org/std/ops/#traits)