Struct oas_core::jobs::JobManager
source · [−]pub struct JobManager { /* private fields */ }
Implementations
sourceimpl JobManager
impl JobManager
pub fn new(db: CouchDB, base_url: impl ToString) -> Self
pub async fn create_job(&self, job: JobCreateRequest) -> Result<JobId>
pub async fn delete_job(&self, job: JobId) -> Result<()>
pub async fn take_job_timeout(
&self,
typ: &str,
timeout: JobTakeTimeout
) -> Result<Option<JobRequest>>
pub async fn take_job(&self, typ: &str) -> Result<Option<JobRequest>>
pub async fn job(&self, id: JobId) -> Result<JobInfo>
pub async fn fetch_jobs(&self, filter: Option<JobFilter>) -> Result<Vec<JobInfo>>
pub async fn pending_jobs(&self, tag: &str, typ: &str) -> Result<Vec<JobInfo>>
pub async fn set_progress(
&self,
job_id: JobId,
req: JobProgressRequest
) -> Result<()>
pub async fn set_failed(&self, job_id: JobId, req: JobFailedRequest) -> Result<()>
pub async fn set_completed(
&self,
job_id: JobId,
req: JobCompletedRequest
) -> Result<()>
Trait Implementations
sourceimpl Clone for JobManager
impl Clone for JobManager
sourcefn clone(&self) -> JobManager
fn clone(&self) -> JobManager
Returns a copy of the value. Read more
1.0.0 · sourcefn 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 JobManager
impl Send for JobManager
impl Sync for JobManager
impl Unpin for JobManager
impl !UnwindSafe for JobManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self
into a collection.fn mapped<U, F, A>(self, f: F) -> SmallVec<A>where
F: FnMut(T) -> U,
A: Array<Item = U>,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be
Self