pub enum BorrowKind {
Shared,
Mutable,
}Expand description
Kind of borrow.
Variants§
Implementations§
Source§impl BorrowKind
impl BorrowKind
Sourcepub fn conflicts_with(&self, other: BorrowKind) -> bool
pub fn conflicts_with(&self, other: BorrowKind) -> bool
Check if this borrow conflicts with another.
Mutable borrows conflict with everything. Shared borrows only conflict with mutable borrows.
Trait Implementations§
Source§impl Clone for BorrowKind
impl Clone for BorrowKind
Source§fn clone(&self) -> BorrowKind
fn clone(&self) -> BorrowKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BorrowKind
impl Debug for BorrowKind
Source§impl Hash for BorrowKind
impl Hash for BorrowKind
Source§impl PartialEq for BorrowKind
impl PartialEq for BorrowKind
Source§fn eq(&self, other: &BorrowKind) -> bool
fn eq(&self, other: &BorrowKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for BorrowKind
impl Eq for BorrowKind
impl StructuralPartialEq for BorrowKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more