pub struct ThreadStateManager { /* private fields */ }Implementations§
Source§impl ThreadStateManager
impl ThreadStateManager
pub async fn subscribe( &self, thread_id: impl Into<String>, connection_id: ConnectionId, )
pub async fn subscribe_and_snapshot<T, E>( &self, thread_id: impl Into<String>, connection_id: ConnectionId, snapshot: impl FnOnce() -> Result<T, E>, ) -> Result<T, E>
pub async fn unsubscribe( &self, thread_id: &str, connection_id: ConnectionId, ) -> bool
pub async fn unsubscribe_connection(&self, connection_id: ConnectionId)
pub async fn subscribers(&self, thread_id: &str) -> Vec<ConnectionId>
pub async fn is_subscribed( &self, thread_id: &str, connection_id: ConnectionId, ) -> bool
pub async fn is_closed(&self, thread_id: &str) -> bool
pub async fn reopen(&self, thread_id: &str)
pub async fn set_active_turn( &self, thread_id: impl Into<String>, active_turn: ActiveTurn, )
pub async fn active_turn(&self, thread_id: &str) -> Option<ActiveTurn>
pub async fn active_turn_id(&self, thread_id: &str) -> Option<String>
pub async fn has_active_turn(&self, thread_id: &str) -> bool
pub async fn set_durable_resume( &self, thread_id: impl Into<String>, turn_id: impl Into<String>, )
pub async fn clear_durable_resume(&self, thread_id: &str, turn_id: &str)
pub async fn clear_active_turn(&self, thread_id: &str, turn_id: &str)
pub async fn queue_follow_up(&self, thread_id: &str, input: Vec<UserInput>)
pub async fn pop_follow_up(&self, thread_id: &str) -> Option<Vec<UserInput>>
pub async fn set_pending_approval( &self, thread_id: impl Into<String>, turn_id: impl Into<String>, request_id: impl Into<String>, connection_id: ConnectionId, )
pub async fn pending_approval(&self, thread_id: &str) -> Option<PendingApproval>
pub async fn clear_pending_approval(&self, thread_id: &str, request_id: &str)
Trait Implementations§
Source§impl Clone for ThreadStateManager
impl Clone for ThreadStateManager
Source§fn clone(&self) -> ThreadStateManager
fn clone(&self) -> ThreadStateManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ThreadStateManager
impl Default for ThreadStateManager
Source§fn default() -> ThreadStateManager
fn default() -> ThreadStateManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ThreadStateManager
impl !UnwindSafe for ThreadStateManager
impl Freeze for ThreadStateManager
impl Send for ThreadStateManager
impl Sync for ThreadStateManager
impl Unpin for ThreadStateManager
impl UnsafeUnpin for ThreadStateManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.