About 8,620,000 results
Open links in new tab
  1. Are there queue and stack collections in Rust? - Stack Overflow

    Nov 28, 2016 · First of all, Rust does not offer (in the Standard library) any collection with guaranteed latency for adding elements: Rust collections may generally allocate memory …

  2. How does rust collect () create different collections generically

    Aug 1, 2021 · How does rust collect () create different collections generically Asked 4 years, 4 months ago Modified 4 years, 4 months ago Viewed 5k times

  3. Does Rust have Collection traits? - Stack Overflow

    Feb 3, 2016 · No, right now there's only Iterator. MutableMap and Map have been removed somewhere along the road to stabilization of std for Rust 1.0. There have been various …

  4. How does the Iterator::collect function work? - Stack Overflow

    Dec 29, 2019 · I am trying to understand the full capabilities of collect function by going through some documentation. I am running into some challenges, specifically in the last example …

  5. How do I create a heterogeneous collection of objects?

    Jan 15, 2015 · I want to use trait objects in a Vec. In C++ I could make a base class Thing from which is derived Monster1 and Monster2. I could then create a std::vector<Thing*>. Thing …

  6. Proper way to implement simple collection in rust [duplicate]

    Jul 7, 2021 · With the ownership rules of Rust, you need to use unsafe Rust code to achieve this. If I were you, I'd think of a different way of implementing your collection following the Rust …

  7. In Rust std::collections::BTreeMap, will the allocated memory be …

    Jun 19, 2024 · In std::vec, the documentation says very clear that clear() has no effect on the allocated capacity of the vector. The doc does not mention that in BTreeMap. So what will …

  8. Rust Collect Hashmap from Iterator of Pairs - Stack Overflow

    Jul 30, 2020 · We have a HashMap, over which we iterate and map to replace the values, but are running into an issue collecting that back to a new HashMap with different value type. value of …

  9. Rust: double linked list - Stack Overflow

    Jul 9, 2023 · Rust is not really the ideal language for implementing a linked list. There is no unique ownership by design, so Rust's type system will have a bit of a hard time. I guess this is more …

  10. How do I use std::collections::BitSet in stable Rust?

    Dec 17, 2017 · @crazysim, Since rust gets a release in every 6 weeks, i thought maybe a newer version than mine, might be having stable API of BitSet.