pub struct BorrowFail;
Expand description
A failure occured while borrowing a Global<T>
value.
This happens when the value is incorrectly borrowed twice within a single thread. While cross-thread locking will simply block until the value is available, within a single thread potential deadlocks are detected. An error can occur in one of three ways:
- Attempting to immutably borrow a value that is already mutably borrowed.
- Attempting to mutably borrow a value that is already mutably borrowed.
- Attempting to mutably borrow a value that is already immutably borrowed.
Note that this error will not be raised in the case of multiple immutable borrows.
Trait Implementations§
Source§impl Debug for BorrowFail
impl Debug for BorrowFail
Source§impl Display for BorrowFail
impl Display for BorrowFail
Source§impl Error for BorrowFail
impl Error for BorrowFail
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for BorrowFail
impl RefUnwindSafe for BorrowFail
impl Send for BorrowFail
impl Sync for BorrowFail
impl Unpin for BorrowFail
impl UnwindSafe for BorrowFail
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