pub struct FieldServiceClient { /* private fields */ }Expand description
Client for the field service optimization API.
Implementations§
Source§impl FieldServiceClient
impl FieldServiceClient
Sourcepub async fn start(
&self,
request: &FieldServiceRequest,
) -> Result<FieldServiceStartResponse>
pub async fn start( &self, request: &FieldServiceRequest, ) -> Result<FieldServiceStartResponse>
Starts a new field service optimization job.
Sourcepub async fn get_status(&self, job_id: &str) -> Result<SolverStatusResponse>
pub async fn get_status(&self, job_id: &str) -> Result<SolverStatusResponse>
Gets the status of a field service optimization job.
Sourcepub async fn get_result(
&self,
job_id: &str,
) -> Result<FieldServiceResultResponse>
pub async fn get_result( &self, job_id: &str, ) -> Result<FieldServiceResultResponse>
Gets the result of a completed field service optimization job.
Sourcepub async fn analyze(&self, job_id: &str) -> Result<Value>
pub async fn analyze(&self, job_id: &str) -> Result<Value>
Gets analysis for a completed field service optimization job.
Sourcepub async fn start_and_wait_for_completion(
&self,
request: &FieldServiceRequest,
poll_interval_ms: u64,
max_attempts: u32,
) -> Result<FieldServiceResultResponse>
pub async fn start_and_wait_for_completion( &self, request: &FieldServiceRequest, poll_interval_ms: u64, max_attempts: u32, ) -> Result<FieldServiceResultResponse>
Starts a job and polls until it completes.
Sourcepub async fn wait_for_completion(
&self,
job_id: &str,
poll_interval_ms: u64,
max_attempts: u32,
) -> Result<FieldServiceResultResponse>
pub async fn wait_for_completion( &self, job_id: &str, poll_interval_ms: u64, max_attempts: u32, ) -> Result<FieldServiceResultResponse>
Polls for job status until the solver finishes or max_attempts is reached.
Trait Implementations§
Source§impl Clone for FieldServiceClient
impl Clone for FieldServiceClient
Source§fn clone(&self) -> FieldServiceClient
fn clone(&self) -> FieldServiceClient
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for FieldServiceClient
impl !UnwindSafe for FieldServiceClient
impl Freeze for FieldServiceClient
impl Send for FieldServiceClient
impl Sync for FieldServiceClient
impl Unpin for FieldServiceClient
impl UnsafeUnpin for FieldServiceClient
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