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

Require Send + Sync for T on Collection

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • Rust Drivers

      The Send + Sync traits are required to use types in certain async contexts. We currently don't require that the user-configured T type on Collection implements these traits, which limits how we can use collections in async code internally within the driver. We should update Collection<T> to require T: Send + Sync. Note that this is a breaking change, but if it proves to be a problem for users, removing the bounds is not breaking.

      See this comment thread for more details: https://github.com/mongodb/mongo-rust-driver/pull/1034#discussion_r1498382401

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: