Struct ora_api::client::ScheduleHandle
source · pub struct ScheduleHandle { /* private fields */ }
Expand description
A handle to a schedule that allows inspection and operations.
Implementations§
source§impl ScheduleHandle
impl ScheduleHandle
sourcepub fn new_raw(ops: Arc<dyn ScheduleOperations>) -> Self
pub fn new_raw(ops: Arc<dyn ScheduleOperations>) -> Self
Create a new schedule handle over a raw implementation.
sourcepub async fn definition(&self) -> Result<ScheduleDefinition>
pub async fn definition(&self) -> Result<ScheduleDefinition>
Return the schedule’s definition.
sourcepub async fn is_active(&self) -> Result<bool>
pub async fn is_active(&self) -> Result<bool>
Return whether the schedule is currently active, meaning it has a currently running task or there can be more tasks spawned by it in the future.
sourcepub async fn cancelled_at(&self) -> Result<Option<OffsetDateTime>>
pub async fn cancelled_at(&self) -> Result<Option<OffsetDateTime>>
Return whether the schedule was cancelled.
sourcepub async fn active_task(&self) -> Result<Option<TaskHandle>>
pub async fn active_task(&self) -> Result<Option<TaskHandle>>
Return the latest active task of the schedule.
A task is considered active if it has not succeeded, has not failed and has not been cancelled.
Trait Implementations§
source§impl Clone for ScheduleHandle
impl Clone for ScheduleHandle
source§fn clone(&self) -> ScheduleHandle
fn clone(&self) -> ScheduleHandle
Returns a copy 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 !RefUnwindSafe for ScheduleHandle
impl Send for ScheduleHandle
impl Sync for ScheduleHandle
impl Unpin for ScheduleHandle
impl !UnwindSafe for ScheduleHandle
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<W> IntoHandler for Wwhere
W: Send + Sync + 'static,
impl<W> IntoHandler for Wwhere W: Send + Sync + 'static,
source§fn handler<T>(self) -> Arc<dyn RawHandler + Send + Sync>where
Self: Handler<T>,
T: Task,
fn handler<T>(self) -> Arc<dyn RawHandler + Send + Sync>where Self: Handler<T>, T: Task,
Convert
self
into a RawHandler
that can be registered
in workers.source§fn handler_with_selector<T>(
self,
selector: WorkerSelector
) -> Arc<dyn RawHandler + Send + Sync>where
Self: Handler<T>,
T: Task,
fn handler_with_selector<T>( self, selector: WorkerSelector ) -> Arc<dyn RawHandler + Send + Sync>where Self: Handler<T>, T: Task,
Convert
self
into a RawHandler
that can be registered
in workers with the given selector.