Struct bcount::Bc
[−]
[src]
pub struct Bc<T> { /* fields omitted */ }
The borrow counter struct for type T
.
Methods
impl<T> Bc<T>
[src]
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>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> DerefMut for Bc<T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value