I am new to Rust, just reading the 2nd edition of the programming in Rust book. I was wondering about the below but couldn't find an answer so far.
When defining a function, you can move some of the parameters. You can also declare them mut (without a reference) if you intend to mutate them within the function.
For the caller, this mut does not seem to have any significance, however. They have just moved ownership, and what happens to the data after that point is not their concern, is it?
So, is it right to say that a mut along with a moved parameter is actually not part of the function's API? Instead, it is leaking implementation details of that function to its signature.
Thanks for helping me understand this better.
Regards, Alex