pub struct ChatNotificationSink<P: ChatPlatform> { /* private fields */ }Expand description
Chat notification sink — sends workflow notifications via ChatPlatform.
Implementations§
Source§impl<P: ChatPlatform + 'static> ChatNotificationSink<P>
impl<P: ChatPlatform + 'static> ChatNotificationSink<P>
pub fn new(platform: Arc<P>, default_channel: String) -> Self
Sourcepub async fn notify_workflow(
&self,
notification: &WorkflowNotification,
thread_id: Option<&str>,
) -> Result<String>
pub async fn notify_workflow( &self, notification: &WorkflowNotification, thread_id: Option<&str>, ) -> Result<String>
Notify about a workflow result.
Sourcepub async fn send(&self, notification: &Notification) -> Result<()>
pub async fn send(&self, notification: &Notification) -> Result<()>
Send a generic notification as a chat message.
Auto Trait Implementations§
impl<P> Freeze for ChatNotificationSink<P>
impl<P> RefUnwindSafe for ChatNotificationSink<P>where
P: RefUnwindSafe,
impl<P> Send for ChatNotificationSink<P>
impl<P> Sync for ChatNotificationSink<P>
impl<P> Unpin for ChatNotificationSink<P>
impl<P> UnsafeUnpin for ChatNotificationSink<P>
impl<P> UnwindSafe for ChatNotificationSink<P>where
P: RefUnwindSafe,
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