This puts responsibility for turning a Serde map into bson values squarely on OwnedOrBorrowedRawBsonVisitor; SeededVisitor's job is now to efficiently buffer those values.
In my plan for the 🎆Glorious Future🎆, OwnedOrBorrowedRawBsonVisitor will also be taking over for the other places that parse extjson (BsonVisitor, TryFrom<serde_json::Value>, crate::extjson::models) and will necessarily be getting more liberal in the forms it accepts, so this means that doesn't need to be mirrored in SeededVisitor as well.
With this, I think the separation of logic is clear enough that there's no need to further merge; the reasoning from your original work on why that would involve quite a bit of complication is still very valid.
RUST-1773
This puts responsibility for turning a Serde map into bson values squarely on
OwnedOrBorrowedRawBsonVisitor
;SeededVisitor
's job is now to efficiently buffer those values.In my plan for the 🎆Glorious Future🎆,
OwnedOrBorrowedRawBsonVisitor
will also be taking over for the other places that parse extjson (BsonVisitor
,TryFrom<serde_json::Value>
,crate::extjson::models
) and will necessarily be getting more liberal in the forms it accepts, so this means that doesn't need to be mirrored inSeededVisitor
as well.With this, I think the separation of logic is clear enough that there's no need to further merge; the reasoning from your original work on why that would involve quite a bit of complication is still very valid.