pub struct WeakTree { /* private fields */ }Expand description
A handle on a tree that does not keep it open, made by
Tree::downgrade and its counterparts.
For a holder that only acts on a live tree, such as a compaction monitor or a queued flush request: it lets a dropped or closing tree close without waiting for the holder.
Implementations§
Source§impl WeakTree
impl WeakTree
Sourcepub fn upgrade(&self) -> Option<AnyTree>
pub fn upgrade(&self) -> Option<AnyTree>
A strong handle on the tree, or None once every strong handle is
gone or the tree is being closed.
A tree being closed is not raised again, even while strong handles taken earlier still finish their work, so a holder woken in between starts no new work the closing would then wait for.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WeakTree
impl !UnwindSafe for WeakTree
impl Freeze for WeakTree
impl Send for WeakTree
impl Sync for WeakTree
impl Unpin for WeakTree
impl UnsafeUnpin for WeakTree
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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