-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
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