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) -> SharedPulse
pub fn new(pulse: impl Pulse + 'static) -> SharedPulse
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 clone(&self) -> SharedPulse
fn clone(&self) -> SharedPulse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> SharedPulse
fn default() -> SharedPulse
Returns the “default value” for a type. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ProgressExt for T
impl<T> ProgressExt for T
Source§impl<T> ReportExt for T
impl<T> ReportExt for T
Source§fn batched(self, threshold: NonZeroU64) -> Batch<Self>where
Self: Sized,
fn batched(self, threshold: NonZeroU64) -> Batch<Self>where
Self: Sized,
Buffer one worker’s reports, publishing them in batches of at least
threshold units, and the remainder on Batch::flush or drop. Read more