pub struct Owner(/* private fields */);Expand description
A unique lifetime owner. Commit starts registered work; drop disposes it. Handles are weak and cannot extend the lifetime. This is single-threaded.
Implementations§
Source§impl Owner
impl Owner
Sourcepub fn new() -> Self
pub fn new() -> Self
Prepare a root lifetime. Work waits for Self::commit.
Sourcepub fn child(parent: &OwnerHandle) -> Self
pub fn child(parent: &OwnerHandle) -> Self
Prepare a child. It activates only after both it and its ancestors commit. An expired parent produces a disposed child.
pub fn handle(&self) -> OwnerHandle
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Owner
impl !Send for Owner
impl !Sync for Owner
impl !UnwindSafe for Owner
impl Freeze for Owner
impl Unpin for Owner
impl UnsafeUnpin for Owner
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