소스 검색

Touch up some documentation for the cmz_core crate

Ian Goldberg 1 개월 전
부모
커밋
3944f2cf30
1개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. 10 4
      cmz_core/src/lib.rs

+ 10 - 4
cmz_core/src/lib.rs

@@ -2,6 +2,10 @@
 #![allow(non_snake_case)]
 
 //! The core functionality of the CMZ protocol macros
+//!
+//! You should not need to use this crate directly.  The [`cmz_core`]
+//! function is called by the `cmz_derive` crate to implement the
+//! `CMZProtocol` family of macros.
 
 use proc_macro2::TokenStream;
 use quote::{format_ident, quote, ToTokens};
@@ -166,7 +170,8 @@ impl<ShowOrIssue: Parse + Copy, const VALID_OPTIONAL: bool> Parse
     }
 }
 
-// A protocol specification, following the syntax described above.
+/// A parsed protocol specification, following the syntax described in
+/// the documentation for the `muCMZProtocol!` macro in the `cmz` crate.
 #[derive(Debug)]
 pub struct ProtoSpec {
     proto_name: Ident,
@@ -297,9 +302,10 @@ impl StructFieldList {
     }
 }
 
-// This is where the main work is done.  The six macros in the
-// CMZProtocol macro family (below) all call this function, with
-// different values for the bools.
+/// Produce the expansion of the `CMZProtocol` family of macros.
+///
+/// The six macros in the `CMZProtocol` macro family all call this
+/// function, with different values for the bools.
 pub fn cmz_core(
     proto_spec: &ProtoSpec,
     use_muCMZ: bool,