pub struct ScheduleHandle<C = Channel> { /* private fields */ }
Expand description
A handle to a schedule.
Implementations§
Source§impl<C> ScheduleHandle<C>where
C: GrpcService<BoxBody> + Clone + Send + Sync + 'static,
<C as GrpcService<BoxBody>>::Future: Send,
C::Error: Into<StdError>,
C::ResponseBody: Body<Data = Bytes> + Send + 'static,
<C::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<C> ScheduleHandle<C>where
C: GrpcService<BoxBody> + Clone + Send + Sync + 'static,
<C as GrpcService<BoxBody>>::Future: Send,
C::Error: Into<StdError>,
C::ResponseBody: Body<Data = Bytes> + Send + 'static,
<C::ResponseBody as Body>::Error: Into<StdError> + Send,
Sourcepub async fn details(&self) -> Result<Arc<ScheduleDetails>>
pub async fn details(&self) -> Result<Arc<ScheduleDetails>>
Get the details of the schedule.
Sourcepub fn cached_details(&self) -> Option<Arc<ScheduleDetails>>
pub fn cached_details(&self) -> Option<Arc<ScheduleDetails>>
Get the cached details of the schedule, if available.
Sourcepub fn jobs(
&self,
filter: JobFilter,
order: JobOrder,
) -> impl Stream<Item = Result<JobHandle<(), C>, AdminClientError>> + Send + Unpin + 'static
pub fn jobs( &self, filter: JobFilter, order: JobOrder, ) -> impl Stream<Item = Result<JobHandle<(), C>, AdminClientError>> + Send + Unpin + 'static
Get the jobs that were created by this schedule with the given filter and order.
Sourcepub async fn job_count(&self) -> Result<u64, AdminClientError>
pub async fn job_count(&self) -> Result<u64, AdminClientError>
Return the amount of jobs that were created by this schedule.
Sourcepub async fn active_job(
&self,
) -> Result<Option<JobHandle<(), C>>, AdminClientError>
pub async fn active_job( &self, ) -> Result<Option<JobHandle<(), C>>, AdminClientError>
Get the active job of the schedule.
Trait Implementations§
Source§impl<C: Clone> Clone for ScheduleHandle<C>
impl<C: Clone> Clone for ScheduleHandle<C>
Source§fn clone(&self) -> ScheduleHandle<C>
fn clone(&self) -> ScheduleHandle<C>
Returns a duplicate of the value. Read more
1.0.0 · 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<C = Channel> !Freeze for ScheduleHandle<C>
impl<C = Channel> !RefUnwindSafe for ScheduleHandle<C>
impl<C> Send for ScheduleHandle<C>where
C: Send,
impl<C> Sync for ScheduleHandle<C>where
C: Sync,
impl<C> Unpin for ScheduleHandle<C>where
C: Unpin,
impl<C = Channel> !UnwindSafe for ScheduleHandle<C>
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> 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<W> IntoExecutionHandler for W
impl<W> IntoExecutionHandler for W
Source§fn handler<J>(self) -> Arc<dyn ExecutionHandlerRaw + Send + Sync>where
Self: ExecutionHandler<J>,
J: JobType,
fn handler<J>(self) -> Arc<dyn ExecutionHandlerRaw + Send + Sync>where
Self: ExecutionHandler<J>,
J: JobType,
Convert
self
into a [RawHandler
] that can be registered
in workers.Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request