pub struct RunJobResult<T: Actor> {
pub job_id: String,
pub result_subscriber_rx: Option<Receiver<Result<<T as Actor>::Result, ActorError>>>,
}Expand description
Handle returned by run_job.
job_id is stable for the life of the job — pass it to
abort_job / stop_job / resume_job. result_subscriber_rx is
Some only when run_job was called with subscribe = true; each
iteration’s outcome is pushed onto it. When the job ends (max_iter
reached, aborted, or single-shot completion) the channel is closed,
so recv() returning None is the natural termination signal.
Fields§
§job_id: StringIdentifier you pass to abort_job / stop_job / resume_job.
Defaults to a fresh UUID v4 unless an explicit id was supplied.
result_subscriber_rx: Option<Receiver<Result<<T as Actor>::Result, ActorError>>>Per-iteration result stream. None when the job was submitted
with subscribe = false (fire-and-forget).
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RunJobResult<T>
impl<T> RefUnwindSafe for RunJobResult<T>
impl<T> Send for RunJobResult<T>
impl<T> Sync for RunJobResult<T>
impl<T> Unpin for RunJobResult<T>
impl<T> UnsafeUnpin for RunJobResult<T>
impl<T> UnwindSafe for RunJobResult<T>
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