I get confused about argument sometimes, if I should be using reference or value in some function signature.
The mental model that I'm trying to follow is: If that function is the last step in the lifetime of some data (e.g. write it to a file), I pass the ownership of the data to the function. Otherwise, I pass it as a reference.
Is this a good way to think about lifecycles?