Struct bcount::Bc [] [src]

pub struct Bc<T> {
    // some fields omitted
}

The borrow counter struct for type T.

Methods

impl<T> Bc<T>

fn new(val: T) -> Bc<T>

Create a new Bc<T> containing the value val.

fn reset(&mut self)

Reset the borrow counter

fn count(&self) -> usize

Get the number of time this structure has been mutably borrowed.

Trait Implementations

impl<T> Deref for Bc<T>

type Target = T

fn deref(&self) -> &T

impl<T> DerefMut for Bc<T>

fn deref_mut(&mut self) -> &mut T