pub struct ConversationManager { /* private fields */ }Expand description
Conversation manager for handling multi-turn voice interactions
Implementations§
Source§impl ConversationManager
impl ConversationManager
Sourcepub fn start_conversation(&mut self) -> String
pub fn start_conversation(&mut self) -> String
Start a new conversation
Sourcepub fn get_conversation(&self, id: &str) -> Option<&ConversationState>
pub fn get_conversation(&self, id: &str) -> Option<&ConversationState>
Get conversation state by ID
Sourcepub fn get_conversation_mut(
&mut self,
id: &str,
) -> Option<&mut ConversationState>
pub fn get_conversation_mut( &mut self, id: &str, ) -> Option<&mut ConversationState>
Get mutable conversation state by ID
Sourcepub fn update_conversation(
&mut self,
id: &str,
command: &str,
spec: Option<OpenApiSpec>,
) -> Result<()>
pub fn update_conversation( &mut self, id: &str, command: &str, spec: Option<OpenApiSpec>, ) -> Result<()>
Update conversation with new command and resulting spec
Sourcepub fn remove_conversation(&mut self, id: &str) -> bool
pub fn remove_conversation(&mut self, id: &str) -> bool
Remove a conversation
Sourcepub fn list_conversations(&self) -> Vec<&ConversationState>
pub fn list_conversations(&self) -> Vec<&ConversationState>
List all active conversations
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConversationManager
impl RefUnwindSafe for ConversationManager
impl Send for ConversationManager
impl Sync for ConversationManager
impl Unpin for ConversationManager
impl UnwindSafe for ConversationManager
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> 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 more