pub struct SolverManager<S>where
S: Solvable,{ /* private fields */ }Expand description
Manages retained async solve jobs with lifecycle-complete event streaming.
Implementations§
Source§impl<S> SolverManager<S>
impl<S> SolverManager<S>
pub const fn new() -> SolverManager<S>
pub fn solve( &'static self, solution: S, ) -> Result<(usize, UnboundedReceiver<SolverEvent<S>>), SolverManagerError>
pub fn get_status( &self, job_id: usize, ) -> Result<SolverStatus<<S as PlanningSolution>::Score>, SolverManagerError>
pub fn pause(&self, job_id: usize) -> Result<(), SolverManagerError>
pub fn resume(&self, job_id: usize) -> Result<(), SolverManagerError>
pub fn cancel(&self, job_id: usize) -> Result<(), SolverManagerError>
pub fn delete(&self, job_id: usize) -> Result<(), SolverManagerError>
pub fn get_snapshot( &self, job_id: usize, snapshot_revision: Option<u64>, ) -> Result<SolverSnapshot<S>, SolverManagerError>
pub fn analyze_snapshot(
&self,
job_id: usize,
snapshot_revision: Option<u64>,
) -> Result<SolverSnapshotAnalysis<<S as PlanningSolution>::Score>, SolverManagerError>where
S: Analyzable,
pub fn active_job_count(&self) -> usize
Trait Implementations§
Source§impl<S> Default for SolverManager<S>where
S: Solvable,
impl<S> Default for SolverManager<S>where
S: Solvable,
Source§fn default() -> SolverManager<S>
fn default() -> SolverManager<S>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<S> !Freeze for SolverManager<S>
impl<S> RefUnwindSafe for SolverManager<S>
impl<S> Send for SolverManager<S>
impl<S> Sync for SolverManager<S>
impl<S> Unpin for SolverManager<S>
impl<S> UnsafeUnpin for SolverManager<S>
impl<S> UnwindSafe for SolverManager<S>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more