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

Implement Copy for ObjectId

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: