pub struct SharedPulse(/* private fields */);Expand description
An owned, cloneable pulse that retains planning and cancellation capabilities. The original phase owner alone may finish it. Requires pointer atomics.
A shared view has no completion operation:
ⓘ
use how_far::{Outcome, SharedPulse};
let shared = SharedPulse::default();
shared.finish(Outcome::Succeeded).unwrap();Implementations§
Sourcepub fn new(pulse: impl Pulse + 'static) -> Self
pub fn new(pulse: impl Pulse + 'static) -> Self
Erase an owned implementation. The implementation must not own the phase’s completion token: dropping clones must not finish the phase.
Trait Implementations§
Source§fn record_issue(&self, error: PlanError)
fn record_issue(&self, error: PlanError)
Record a reporting-protocol problem for optional diagnostics. This never
changes cancellation or the operation’s return value. Ordinary sinks may
ignore it; diagnostic wrappers retain bounded evidence.
Source§fn split(
&self,
execution: Execution,
parts: &[PhaseSpec<'_>],
) -> Result<Vec<Child<'_>>, PlanError>
fn split( &self, execution: Execution, parts: &[PhaseSpec<'_>], ) -> Result<Vec<Child<'_>>, PlanError>
Split this phase into weighted children, in declared order. Read more
Source§fn start(&self) -> Result<(), PlanError>
fn start(&self) -> Result<(), PlanError>
Mark this phase running, without counting or ending planning.
Implementations without lifecycle observations may ignore this.
Source§fn set_total(&self, total: Total) -> Result<(), PlanError>
fn set_total(&self, total: Total) -> Result<(), PlanError>
Revise a leaf’s denominator without changing completed units or weights.
Unsupported implementations return an error instead of losing the update.
Share all pulse capabilities with owned work, but never completion rights. Read more
Auto Trait Implementations§
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