Creates a new box.
impl<T, H> Box<T, H>
where H: Allocator,
<H as Allocator>::Pool: Default,
{
fn new() -> Result<BoxBuf<T, H>, Errno>
}This function first creates an BoxBuf which can then be used to create a real Box as shown in the example. The function does not take a value argument itself since this would complicate handling the case where allocating memory fails. = Examples
let bx: Box<u8> = try!(Box::new()).set(0);