Skip to content

Rust operators can be extended by implementing Traits

It's possible to use Rust's built-in operators with your own types by implementing the correct Traits. For example, in order to use + you can implement core::ops::Add.

References