We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bc6318d + d3ac395 commit 59ba55dCopy full SHA for 59ba55d
src/doc/reference.md
@@ -3622,6 +3622,14 @@ The `Sized` trait indicates that the size of this type is known at compile-time.
3622
The `Drop` trait provides a destructor, to be run whenever a value of this type
3623
is to be destroyed.
3624
3625
+## The `Deref` trait
3626
+
3627
+The `Deref<Target = U>` trait allows a type to implicitly implement all the methods
3628
+of the type `U`. When attempting to resolve a method call, the compiler will search
3629
+the top-level type for the implementation of the called method. If no such method is
3630
+found, `.deref()` is called and the compiler continues to search for the method
3631
+implementation in the returned type `U`.
3632
3633
# Memory model
3634
3635
A Rust program's memory consists of a static set of *items* and a *heap*.
0 commit comments