How to define a copyable struct containing a String?
<p>I have a struct like that</p>

<pre><code>#[derive(Copy, Clone)]
enum Command {
    Quit,
    Error { msg: String },
}
</code></pre>

<p>The compiler complains that it cannot generate a copy constructor for <code>Error</code>.</p>

<p>I need to make the struct copyable to pass over a channel to another thread.</p>

<pre><code>error: the trait `Copy` may not be implemented for this type; variant `Error` does not implement `Copy` [E0205]
#[derive(Copy, Clone)]
^~~~~~~~~~~~~~~~~~~~~~
note: in this expansion of #[derive_Copy] (defined in src/main.rs)
</code></pre>

<p>It compiles if <code>msg</code> is an <code>i32</code>. It looks strange that such basic 
type as <code>String</code> is not copyable.</p>