pub fn try_from_box_bytes<T: AnyBitPattern>(
    input: BoxBytes
) -> Result<Box<T>, (PodCastError, BoxBytes)>
Available on crate feature extern_crate_alloc only.
Expand description

Re-interprets BoxBytes as Box<T>.

§Panics

  • If the input isn’t aligned for the new type
  • If the input’s length isn’t exactly the size of the new type