Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-680

Implement Copy for ObjectId

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-2.0.0-beta
    • Affects Version/s: None
    • Component/s: BSON
    • None

      Given that an ObjectId is only 12 bytes, we could implement the Copy trait on it to avoid the need for explicit clones or references without sacrificing any performance.

      As part of this, we can make a breaking change to update the typed accessor on Document to return an owned ObjectId instead of a reference to one and include that in the bson 2.0 release.

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: