Expand description

A pointer to T that calls its destructor but not its deallocator when dropped.

Examples

use varlen::prelude::*;
type TypeWithDrop = Tup2<FixedLen<Box<u32>>, Str>;
let arena = bumpalo::Bump::new();
let owned: Owned<TypeWithDrop> = Owned::new_in(
    tup2::Init(
        FixedLen(Box::new(42)),
        Str::copy("hello")
    ),
    &arena);
assert_eq!(42, *owned.refs().0.0);
drop(owned); // Calls drop() on the Box<u32>
drop(arena); // Deallocates the arena storage.

Structs

A pointer to T that calls its destructor but not its deallocator when dropped.