File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3622,6 +3622,14 @@ The `Sized` trait indicates that the size of this type is known at compile-time.
36223622The ` Drop ` trait provides a destructor, to be run whenever a value of this type
36233623is to be destroyed.
36243624
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+
36253633# Memory model
36263634
36273635A Rust program's memory consists of a static set of * items* and a * heap* .
You can’t perform that action at this time.
0 commit comments