pub struct ChatAdapter<P: ChatPlatform> { /* private fields */ }Expand description
Chat adapter that converts workflow events to chat messages.
Implementations§
Source§impl<P: ChatPlatform + 'static> ChatAdapter<P>
impl<P: ChatPlatform + 'static> ChatAdapter<P>
pub fn new(platform: Arc<P>, channel_id: String) -> Self
pub fn with_shadow_default(self, shadow: bool) -> Self
Sourcepub async fn run(&self, rx: Receiver<WorkflowEvent>)
pub async fn run(&self, rx: Receiver<WorkflowEvent>)
Start listening to a broadcast channel of workflow events. Runs until the channel is closed or an error occurs.
Sourcepub async fn thread_for_execution(&self, execution_id: &str) -> Option<String>
pub async fn thread_for_execution(&self, execution_id: &str) -> Option<String>
Get the thread ID for an active execution.
Auto Trait Implementations§
impl<P> Freeze for ChatAdapter<P>
impl<P> !RefUnwindSafe for ChatAdapter<P>
impl<P> Send for ChatAdapter<P>
impl<P> Sync for ChatAdapter<P>
impl<P> Unpin for ChatAdapter<P>
impl<P> UnsafeUnpin for ChatAdapter<P>
impl<P> !UnwindSafe for ChatAdapter<P>
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