@@ -14,40 +14,40 @@ use crate::HasParamSpec;
14
14
// rustdoc-stripper-ignore-next
15
15
/// A type that can be used as a property. It covers every type which have an associated `ParamSpec`
16
16
/// (`HasParamSpec`) and some useful types wrapping `HasParamSpec`.
17
- /// The definition is recursive, so you can nest many `PropType `s together. The final `ParamSpec` will
17
+ /// The definition is recursive, so you can nest many `Property `s together. The final `ParamSpec` will
18
18
/// be the one of the innermost type
19
- pub trait PropType {
20
- type HasSpecType ;
19
+ pub trait Property {
20
+ type Inner : HasParamSpec ;
21
21
}
22
- impl < T : HasParamSpec > PropType for T {
23
- type HasSpecType = T ;
22
+ impl < T : HasParamSpec > Property for T {
23
+ type Inner = T ;
24
24
}
25
- impl < T : PropType > PropType for Option < T > {
26
- type HasSpecType = T :: HasSpecType ;
25
+ impl < T : Property > Property for Option < T > {
26
+ type Inner = T :: Inner ;
27
27
}
28
- impl < T : PropType > PropType for PhantomData < T > {
29
- type HasSpecType = T :: HasSpecType ;
28
+ impl < T : Property > Property for PhantomData < T > {
29
+ type Inner = T :: Inner ;
30
30
}
31
- impl < T : PropType > PropType for RefCell < T > {
32
- type HasSpecType = T :: HasSpecType ;
31
+ impl < T : Property > Property for RefCell < T > {
32
+ type Inner = T :: Inner ;
33
33
}
34
- impl < T : PropType > PropType for Cell < T > {
35
- type HasSpecType = T :: HasSpecType ;
34
+ impl < T : Property > Property for Cell < T > {
35
+ type Inner = T :: Inner ;
36
36
}
37
- impl < T : PropType > PropType for Mutex < T > {
38
- type HasSpecType = T :: HasSpecType ;
37
+ impl < T : Property > Property for Mutex < T > {
38
+ type Inner = T :: Inner ;
39
39
}
40
- impl < T : PropType > PropType for RwLock < T > {
41
- type HasSpecType = T :: HasSpecType ;
40
+ impl < T : Property > Property for RwLock < T > {
41
+ type Inner = T :: Inner ;
42
42
}
43
- impl < T : PropType > PropType for Rc < T > {
44
- type HasSpecType = T :: HasSpecType ;
43
+ impl < T : Property > Property for Rc < T > {
44
+ type Inner = T :: Inner ;
45
45
}
46
- impl < T : PropType > PropType for Arc < T > {
47
- type HasSpecType = T :: HasSpecType ;
46
+ impl < T : Property > Property for Arc < T > {
47
+ type Inner = T :: Inner ;
48
48
}
49
- impl < T : PropType > PropType for OnceCell < T > {
50
- type HasSpecType = T :: HasSpecType ;
49
+ impl < T : Property > Property for OnceCell < T > {
50
+ type Inner = T :: Inner ;
51
51
}
52
52
53
53
// rustdoc-stripper-ignore-next
@@ -112,7 +112,7 @@ impl<T> PropRead for OnceCell<T> {
112
112
// `ParamStoreWrite` requires a function taking Self::Value, but OnceCell doesn't have
113
113
// an internal value before being init. Still, I'm implementing it so that the derive `Props`
114
114
// macro can easily work with it
115
- impl < T : PropType + Default > PropWrite for OnceCell < T > {
115
+ impl < T : Property + Default > PropWrite for OnceCell < T > {
116
116
type Value = T ;
117
117
fn set < F : FnOnce ( & mut Self :: Value ) > ( & self , f : F ) {
118
118
let mut v = Self :: Value :: default ( ) ;
0 commit comments