Skip to main content

TaskStatusSignal

Trait TaskStatusSignal 

Source
pub trait TaskStatusSignal:
    Send
    + Sync
    + 'static {
    // Required method
    fn publish_status_change<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: TaskStatusNotificationParams,
        session_id: Option<&'life1 String>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn subscribe(&self) -> Option<TaskStatusStream> { ... }
}

Required Methods§

Source

fn publish_status_change<'life0, 'life1, 'async_trait>( &'life0 self, event: TaskStatusNotificationParams, session_id: Option<&'life1 String>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Publish a status change event

Provided Methods§

Source

fn subscribe(&self) -> Option<TaskStatusStream>

Return a new independent stream of events

Implementors§

Source§

impl<Req, Res> TaskStatusSignal for InMemoryTaskStore<Req, Res>
where Req: Clone + Debug + Send + Sync + 'static + Deserialize<'static> + Serialize, Res: Clone + Debug + Send + Sync + 'static + Deserialize<'static> + Serialize,