Struct testdrop::TestDrop
[−]
[src]
pub struct TestDrop { /* fields omitted */ }
A struct to help test drop related issues.
See the module documentation for examples of usage.
Methods
impl TestDrop
[src]
fn new() -> TestDrop
Creates a new TestDrop
.
fn new_item(&self) -> (usize, Item)
Creates a new Item
and returns the id
of the item and the item.
The id
of the item can be used with assert_drop
and assert_no_drop
.
fn num_tracked_items(&self) -> usize
Returns the number of tracked items.
fn num_dropped_items(&self) -> usize
Returns the number of dropped items so far.