Skip to content

Commit bb07a89

Browse files
committed
docs: Add doc comments
1 parent 3e97237 commit bb07a89

File tree

1 file changed

+11
-0
lines changed
  • crates/stackable-versioned-macros/src/codegen/common

1 file changed

+11
-0
lines changed

crates/stackable-versioned-macros/src/codegen/common/container.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ where
3232
fn generate_tokens(&self) -> TokenStream;
3333
}
3434

35+
/// This struct bundles values from [`DeriveInput`][1].
36+
///
37+
/// [`DeriveInput`][1] cannot be used directly when constructing a
38+
/// [`VersionedStruct`][2] or [`VersionedEnum`][3] because we run into borrow
39+
/// issues caused by the match statement which extracts the data.
40+
///
41+
/// [1]: syn::DeriveInput
42+
/// [2]: crate::codegen::vstruct::VersionedStruct
43+
/// [3]: crate::codegen::venum::VersionedEnum
3544
pub(crate) struct ContainerInput {
3645
pub(crate) original_attributes: Vec<Attribute>,
3746
pub(crate) visibility: Visibility,
@@ -56,6 +65,8 @@ pub(crate) struct VersionedContainer<I> {
5665
/// The ident, or name, of the versioned container.
5766
pub(crate) ident: Ident,
5867

68+
/// The visibility of the versioned container. Used to forward the
69+
/// visibility during code generation.
5970
pub(crate) visibility: Visibility,
6071

6172
/// The original attributes that were added to the container.

0 commit comments

Comments
 (0)