Crate dioxus_debug_cell
source ·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 kind ported from nightly std
Structs
- Wraps a borrowed reference to a value in a
RefCell
box. A wrapper type for an immutably borrowed value from aRefCell<T>
. - A clone of the standard library’s
RefCell
type. - A wrapper type for a mutably borrowed value from a
RefCell<T>
.
Enums
- An enumeration of values returned from the
state
method on aRefCell<T>
.