pub trait EventScheduler: Send + Sync + 'static {
    // Required methods
    fn schedule_event<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ScheduleEventRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ScheduleToken>, Status>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn reschedule_event<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RescheduleEventRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ScheduleToken>, Status>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn cancel_scheduled_event<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CancelScheduledEventRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<InstructionAck>, Status>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with EventSchedulerServer.

Required Methods§

source

fn schedule_event<'life0, 'async_trait>( &'life0 self, request: Request<ScheduleEventRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ScheduleToken>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication.

source

fn reschedule_event<'life0, 'async_trait>( &'life0 self, request: Request<RescheduleEventRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ScheduleToken>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Cancel a scheduled event and schedule another in its place.

source

fn cancel_scheduled_event<'life0, 'async_trait>( &'life0 self, request: Request<CancelScheduledEventRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<InstructionAck>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Cancel the publication of a scheduled event. If the events has already been published, this method does nothing.

Implementors§