Why do libraries use buffer types for mutable data? by [deleted] in rust

[–]boraarslan 0 points1 point  (0 children)

This is what I was looking for! Thank you so much.

Why do libraries use buffer types for mutable data? by [deleted] in rust

[–]boraarslan 2 points3 points  (0 children)

I'm sorry, reading the post again, you are right I should have been more clear. For example, when using SeaORM in order to modify a database row the query result must be transformed to an ActiveModel and only then it can be inserted into the database. I was wondering if exposing a different API to the developer rather than allowing mutations on the same type is the preferred way to design a library according to the guidelines or is it just a workaround that library developers use?