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

Write a guide on Serde integration with the driver

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      It would be nice to write a guide that covers some common things people might want to do when they are using custom Serialize/Deserialize types with the driver.

      For example, we could mention that if you add a field to your schema and have documents that are missing it, using an Option would allow you to handle it gracefully.

      Or, if you want to rename your _id field to something else in your struct (perhaps you are using a username as a unique key, for example) we could show how to use the serde renaming attribute to do that.

      We've also had a user ask about handling schema changes in the past, so we could take some inspiration from this .NET driver page on how to handle this with your custom types: https://mongodb.github.io/mongo-csharp-driver/2.14/reference/bson/mapping/schema_changes/

            Assignee:
            Unassigned Unassigned
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: