# Rust Deref coercion example
https://doc.rust-lang.org/std/ops/trait.Deref.html
```
use std::ops::Deref;
struct DerefExample<T> {
value: T
}
impl<T> Deref for DerefExample<T> {
type Target = T;
fn deref(&self) -> &Self::Target {
&self.value
}
}
let x = DerefExample { value: 'a' };
assert_eq!('a', *x);
```
Deref coercion can be used in newtype:
```
struct MyI32(i32)
impl Deref for MyI32 {
type Target = i32;
fn deref(&self) -> &Self::Target {
&self.0
}
}
```