cgp_field/impls/map_type.rs
1use crate::traits::MapType;
2use crate::types::Void;
3
4pub struct IsPresent;
5
6impl MapType for IsPresent {
7 type Map<T> = T;
8}
9
10pub struct IsNothing;
11
12impl MapType for IsNothing {
13 type Map<T> = ();
14}
15
16pub struct IsVoid;
17
18impl MapType for IsVoid {
19 type Map<T> = Void;
20}
21
22pub struct IsOptional;
23
24impl MapType for IsOptional {
25 type Map<T> = Option<T>;
26}