Implicit Conversions
The Rust integer types all implement the and Intofrom()
method and similarly, the Into<T>
trait has a single into()
method. Implementing these traits is how a type expresses that it can be converted into another type.
The same applies for your own From
implementations for your own types, so it is sufficient to only implement From
to get a respective implementation automatically.