Browse Source

Add documentation to index_cols! macro.

Kestrel 7 months ago
parent
commit
168170caca
1 changed files with 5 additions and 0 deletions
  1. 5 0
      microrm-macros/src/lib.rs

+ 5 - 0
microrm-macros/src/lib.rs

@@ -74,6 +74,11 @@ pub fn derive_database(tokens: TokenStream) -> TokenStream {
     database::derive(tokens)
     database::derive(tokens)
 }
 }
 
 
+/// Index columns specification macro.
+///
+/// This macro uses the type indirection set up in microrm to take a list of struct fields, such as
+/// `SomeStruct::field_a, SomeStruct::field_b`, and converts it to an EntityPartList for the
+/// relevant entity.
 #[proc_macro]
 #[proc_macro]
 pub fn index_cols(tokens: TokenStream) -> TokenStream {
 pub fn index_cols(tokens: TokenStream) -> TokenStream {
     index::index_cols(tokens)
     index::index_cols(tokens)