pub struct View<R>(/* private fields */);
Expand description
A view into a node’s data, allowing limited mutation
Implementations§
Source§impl<'a, T> View<RwLockWriteGuard<'a, T>>
impl<'a, T> View<RwLockWriteGuard<'a, T>>
Sourcepub fn downgrade(self) -> View<RwLockReadGuard<'a, T>>
pub fn downgrade(self) -> View<RwLockReadGuard<'a, T>>
Downgrade this write view to a read view
Sourcepub fn downgrade_to_upgradeable(self) -> View<RwLockUpgradableReadGuard<'a, T>>
pub fn downgrade_to_upgradeable(self) -> View<RwLockUpgradableReadGuard<'a, T>>
Downgrade this write view to an upgradeable read view
Source§impl<'a, T> View<RwLockUpgradableReadGuard<'a, T>>
impl<'a, T> View<RwLockUpgradableReadGuard<'a, T>>
Sourcepub fn upgrade(self) -> View<RwLockWriteGuard<'a, T>>
pub fn upgrade(self) -> View<RwLockWriteGuard<'a, T>>
Upgrade this read guard
Sourcepub fn try_upgrade(self) -> Result<View<RwLockWriteGuard<'a, T>>, Self>
pub fn try_upgrade(self) -> Result<View<RwLockWriteGuard<'a, T>>, Self>
Try to upgrade this read guard
Trait Implementations§
impl<R> StructuralPartialEq for View<R>
Auto Trait Implementations§
impl<R> Freeze for View<R>where
R: Freeze,
impl<R> RefUnwindSafe for View<R>where
R: RefUnwindSafe,
impl<R> Send for View<R>where
R: Send,
impl<R> Sync for View<R>where
R: Sync,
impl<R> Unpin for View<R>where
R: Unpin,
impl<R> UnwindSafe for View<R>where
R: UnwindSafe,
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> 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