Implement Copy for ObjectId

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • bson-2.0.0-beta
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
            Samuel Rossi (Inactive)
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: