Allow passing a HashMap directly into the doc macro

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Rust Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      See this issue for more details:

      Passing a map like this seems like a reasonable use case. Ideally, we'd be able to accept anything type that produces an iterator of (impl Into<String>, impl Into<Bson>) pairs. We could potentially implement a conversion like this for Document or amend this existing implementation to be more permissive. We'd then need to update the doc!/bson! macros to accept this kind of trait impl.

            Assignee:
            Unassigned
            Reporter:
            Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: