How * in Rust can get the actual value of &T?

⚓ Rust    📅 2025-10-16    👤 surdeus    👁️ 1      

surdeus

Hi guys, I am new to Rust. I have some questions about the concept of "Dereferencing" using *

I have read some posts and answers on this site, but things still seem unclear to a newbie like me. My questions are as follows:

How * in Rust get the actual value of a reference? While i see the definition of * (deref method from std::ops::Deref) will return a reference to a type T (&T), not the actual value. But when i use *, the result i get is the actual value, not the reference to that actual value.

If my question is not clear, or I have missed anything in this post, I hope everyone will give me feedback so I can change it. Thanks everyone.

8 posts - 4 participants

Read full topic

🏷️ Rust_feed