Expand description
A clone of the standard library’s RefCell
type with extra debugging
support in non-release builds.
Whenever a borrow error happens the current locations of where known borrows were created will be printed out as well.
§Examples
use debug_cell::RefCell;
let r = RefCell::new(3);
let a = r.borrow();
// In debug builds this will print that the cell is currently borrowed
// above, and in release builds it will behave the same as the standard
// library's `RefCell`
let b = r.borrow_mut();
Modules§
- error
- Error kind ported from nightly std
Structs§
- Ref
- Wraps a borrowed reference to a value in a
RefCell
box. A wrapper type for an immutably borrowed value from aRefCell<T>
. - RefCell
- A clone of the standard library’s
RefCell
type. - RefMut
- A wrapper type for a mutably borrowed value from a
RefCell<T>
.
Enums§
- Borrow
State - An enumeration of values returned from the
state
method on aRefCell<T>
.