Skip to content

Conversation

@soareschen
Copy link
Collaborator

@soareschen soareschen commented Sep 13, 2025

Summary

This PR adds __ prefix to the generated partial records and variants generated from #[CgpData].

This is to emphasize that the partial data types generated are meant for internal use by CGP, and that the users should not refer to the concrete types directly.

Example

Given the following:

#[derive(CgpData)]
pub struct Person {
    pub name: String,
    pub age: u8,
}

The partial records that is generated would be named as __PartialPerson instead of PartialPerson:

pub struct __PartialPerson<F0: MapType, F1: MapType> {
    pub name: F0::Map<String>,
    pub age: F1::Map<u8>,
}

@soareschen soareschen merged commit 4804108 into main Sep 13, 2025
5 checks passed
@soareschen soareschen deleted the macro-ident-prefix branch September 13, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants