pub enum BorrowState {
Reading,
Writing,
Unused,
}
Expand description
An enumeration of values returned from the state
method on a RefCell<T>
.
Variants§
Reading
The cell is currently being read, there is at least one active borrow
.
Writing
The cell is currently being written to, there is an active borrow_mut
.
Unused
There are no outstanding borrows on this cell.
Trait Implementations§
Source§impl Clone for BorrowState
impl Clone for BorrowState
Source§fn clone(&self) -> BorrowState
fn clone(&self) -> BorrowState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BorrowState
impl Debug for BorrowState
Source§impl PartialEq for BorrowState
impl PartialEq for BorrowState
impl Copy for BorrowState
impl Eq for BorrowState
impl StructuralPartialEq for BorrowState
Auto Trait Implementations§
impl Freeze for BorrowState
impl RefUnwindSafe for BorrowState
impl Send for BorrowState
impl Sync for BorrowState
impl Unpin for BorrowState
impl UnwindSafe for BorrowState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more