Is it possible to declare a tuple struct whose members are private, except for initialization?
<p>Is it possible to declare a tuple struct where the members are hidden for all intents and purposes, except for declaring?</p>

<pre><code>// usize isn't public since I don't want users to manipulate it directly
struct MyStruct(usize); 

// But now I can't initialize the struct using an argument to it.
let my_var = MyStruct(0xff)
//                    ^^^^
//                    How to make this work?
</code></pre>

<p>Is there a way to keep the member private but still allow new structs to be initialized with an argument as shown above?</p>

<p>As an alternative, a method such as <code>MyStruct::new</code> can be implemented, but I'm still interested to know if its possible to avoid having to use a method on the type since it's shorter, and nice for types that wrap a single variable.</p>

<hr>

<h3>Background</h3>

<p>Without going into too many details, the only purpose of this type is to wrap a single type <em>(a helper which hides some details, adds some functionality and is optimized away completely when compiled)</em>, in this context it's not exactly exposing hidden internals to use the <code>Struct(value)</code> style initializing.
Further, since the wrapper is zero overhead, its a little misleading to use the <code>new</code> method which is often associated with allocation/creation instead of casting.</p>

<p>Just as it's convenient type <code>(int)v</code> or <code>int(v)</code>, instead of <code>int::new(v)</code>,  I'd like to do this for my own type.</p>

<p>It's used often, so the ability to use short expression is very convenient. Currently I'm using a macro which calls a <code>new</code> method, its OK but a little awkward/indirect, hence this question.</p>