`Deref` coercions
https://doc.rust-lang.org/book/deref-coercions.html
*
も型に合わせて定義できる。
use std::ops::Deref; struct DerefExample<T> { value: T, } impl<T> Deref for DerefExample<T> { type Target = T; fn deref(&self) -> &T { &self.value } } fn main() { let x = DerefExample { value: 'a' }; assert_eq!('a', *x); }