Don't understand when you need borrowing?

It's hard for me to understand when to use references and when do arguments? For example, self and self, or when the function needs to return a reference(fn some_fn(v) -> (&)i32)?
March 12th 20 at 08:11
1 answer
March 12th 20 at 08:13
If the function receives a reference, it is not control over her life time. When the function received the object is not the link, she owns it and no one else has access to it until the function it will not return if anywhere will give. If the function never returned and no where preserved, occupied by the object memory is freed on completion of the function.

Find more questions by tags Rust