Static dispatching vs dynamic dispatch in Rust