What is an idiomatic way to create a zero-sized struct that can't be instantiated outside its crate?
问题 I have something similar to this: mod private { // My crate pub struct A; impl A { pub fn new() -> Self { Self } // ... } } fn main() { // External code let obj = private::A::new(); let obj2 = private::A; } Currently, A doesn't need to store any internal state to do what I want it to (it's just being used as a placeholder in an enum), so I made it a zero-sized struct. However, that might change in the future, so I want to prevent code outside this crate from instantiating A without going