pub struct LineageHandle(/* private fields */);Expand description
dioring’s handle to a live lineage (DI-D-40): what pushing into the lineage and sealing it take. Cloning it is cheap, and every copy names the same lineage.
Releasing the last copy ends the lineage (DI-D-30): every epoch of it not yet durable is
abandoned, and a LineageEnded entry reports it. #[must_use] warns when a returned handle is
discarded unused, but not for let _ = ..., which releases it at once, nor for a handle
dropped with whatever held it – so keep a copy for as long as the lineage’s work matters. The
default lineage never ends this way: the instance holds a copy of its own.
Implementations§
Source§impl LineageHandle
impl LineageHandle
Sourcepub fn mint(lineage: Lineage, home: Weak<dyn Home>) -> LineageHandle
pub fn mint(lineage: Lineage, home: Weak<dyn Home>) -> LineageHandle
A handle to lineage, whose last release ends it through home.
Sourcepub fn detached(lineage: Lineage) -> LineageHandle
pub fn detached(lineage: Lineage) -> LineageHandle
A handle to lineage that ends nothing when released: for a lineage whose instance keeps
nothing to end, such as a fake’s one lineage.
Sourcepub fn lineage(&self) -> Lineage
pub fn lineage(&self) -> Lineage
The lineage, by its Copy name: what entries, reports and a consumer’s own records use.
Sourcepub fn at<E, I>(&self, id: E) -> Tag<'_, DioringIds<E, I>>
pub fn at<E, I>(&self, id: E) -> Tag<'_, DioringIds<E, I>>
Epoch id of this lineage, as a write or a seal takes it.
Sourcepub fn is_homed_at<T>(&self, home: &Arc<T>) -> boolwhere
T: ?Sized,
pub fn is_homed_at<T>(&self, home: &Arc<T>) -> boolwhere
T: ?Sized,
Sourcepub fn take_last(self) -> Result<Lineage, LineageHandle>
pub fn take_last(self) -> Result<Lineage, LineageHandle>
Consume the lineage’s last handle without ending the lineage through it, because the caller is ending or retiring it explicitly. Hands the handle back if another copy exists.
Trait Implementations§
Source§impl Clone for LineageHandle
impl Clone for LineageHandle
Source§fn clone(&self) -> LineageHandle
fn clone(&self) -> LineageHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more