Skip to content

Do not expose struct fields #3

@jialinli98

Description

@jialinli98

All structs have fields as pub or pub(crate) because callers create instances using struct literal syntax, i.e. s = A { b: 3, c: 4 };
I’d like to make some fields private and instantiate with A::new().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions