title: How can I get an array or a slice from a raw pointer?
body: <p>Can I somehow get an array from <code>std::ptr::read</code>?</p>
  
  <p>I'd like to do something close to:</p>
  
  <pre><code>let mut v: Vec&lt;u8&gt; = ...
  let view = &amp;some_struct as *const _ as *const u8;
  v.write(&amp;std::ptr::read&lt;[u8, ..30]&gt;(view));
  </code></pre>
  
  <p>Which is not valid in this form (can't use the array signature).</p>