design/ptr.rs
1use std::ptr::Pointee;
2
3mod non_null;
4mod raw_const;
5mod raw_mut;
6
7/// Pointer metadata.
8///
9/// This alias is often more convenient than typing `<T as Pointee>::Metadata`. It also is nicer to
10/// read, since when `T` is rather long, because reading `<MyVeryLongLooooongLoooong<Type, With, Many,
11/// Generics> as Pointee>::Metadata` feels like "here's a long type, **psych** it's actually its
12/// metadata that we want!".
13pub type Metadata<T> = <T as Pointee>::Metadata;