Polymorphism

Rust does not support classes and sub-classing; therefore polymorphism can't be achieved in an identical manner to Java.

In Rust, polymorphism is mainly achieved via virtual dispatch using trait objects.

See also: