Struct global::BorrowFail
source · pub struct BorrowFail;
Expand description
A failure occured while borrowing the global 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)>
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()