Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming for hidden items that have to be public #243

Open
kgv opened this issue Jun 10, 2021 · 0 comments
Open

Naming for hidden items that have to be public #243

kgv opened this issue Jun 10, 2021 · 0 comments

Comments

@kgv
Copy link

kgv commented Jun 10, 2021

For example, if we want to use structure fields or some function inside a macro but don't want them to be part of the API, we mark them as hidden.

pub struct Struct {
    /// This is an implementation detail and **should not** be used directly!
    #[doc(hidden)]
    pub __field: u8,
}

I think it would be useful to specify a naming convention for these cases.

Relevant links:

What does it signify to precede a variable name with two underscores? __var
Down a Rusty Rabbit Hole

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

No branches or pull requests

1 participant