#[non_exhaustive]pub enum BorrowKind {
Untracked,
Shared,
Unique,
Owning,
UniquePinning,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Untracked
Other borrows are allowed (like *mut T and RcRef<T>).
Other Shared simultaneous borrows are allowed (like &T).
Unique
No other simultaneous tracked borrows are allowed (like &mut T).
Owning
No other simultaneous or subsequent borrows are allowed (like &own T).
UniquePinning
No other simultaneous tracked borrows are allowed and drop must be
called before the underlying memory is reclaimed (like &pin mut T).
Auto Trait Implementations§
impl Freeze for BorrowKind
impl RefUnwindSafe for BorrowKind
impl Send for BorrowKind
impl Sync for BorrowKind
impl Unpin for BorrowKind
impl UnsafeUnpin for BorrowKind
impl UnwindSafe for BorrowKind
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