Struct ora::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, Global>) -> ScheduleHandle
pub fn new_raw(ops: Arc<dyn ScheduleOperations, Global>) -> ScheduleHandle
Create a new schedule handle over a raw implementation.
sourcepub async fn definition(
&self
) -> impl Future<Output = Result<ScheduleDefinition, Report>>
pub async fn definition( &self ) -> impl Future<Output = Result<ScheduleDefinition, Report>>
Return the schedule’s definition.
sourcepub async fn is_active(&self) -> impl Future<Output = Result<bool, Report>>
pub async fn is_active(&self) -> impl Future<Output = Result<bool, Report>>
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
) -> impl Future<Output = Result<Option<OffsetDateTime>, Report>>
pub async fn cancelled_at( &self ) -> impl Future<Output = Result<Option<OffsetDateTime>, Report>>
Return whether the schedule was cancelled.
sourcepub async fn active_task(
&self
) -> impl Future<Output = Result<Option<TaskHandle<()>>, Report>>
pub async fn active_task( &self ) -> impl Future<Output = Result<Option<TaskHandle<()>>, Report>>
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