Please convert this into Rust. Assume a vector of generic summable types as input.