File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1001,9 +1001,14 @@ pub fn derive_props(input: TokenStream) -> TokenStream {
1001
1001
properties:: impl_derive_props ( input)
1002
1002
}
1003
1003
1004
- /// This macro is shorteng for:
1005
- ///
1004
+ /// When applied to `ObjectImpl`
1005
+ /// ```ignore
1006
+ /// #[glib::derived_properties]
1007
+ /// impl ObjectImpl for CustomObject
1008
+ /// ```
1009
+ /// this macro generates
1006
1010
/// ```ignore
1011
+ /// impl ObjectImpl for CustomObject {
1007
1012
/// fn properties() -> &'static [glib::ParamSpec] {
1008
1013
/// Self::derived_properties()
1009
1014
/// }
@@ -1013,9 +1018,8 @@ pub fn derive_props(input: TokenStream) -> TokenStream {
1013
1018
/// fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
1014
1019
/// self.derived_property(id, pspec)
1015
1020
/// }
1021
+ /// }
1016
1022
/// ```
1017
- ///
1018
- /// for ObjectImpl trait implementation
1019
1023
#[ proc_macro_attribute]
1020
1024
#[ proc_macro_error]
1021
1025
pub fn derived_properties ( _attr : TokenStream , item : TokenStream ) -> TokenStream {
You can’t perform that action at this time.
0 commit comments