pub enum SystemCommand {
ProcessMessage {
session_id: String,
message: Message,
sender: Box<dyn FnOnce(Result<Message>) + Send>,
},
GenerateResponse {
session_id: String,
context: Vec<Message>,
sender: Box<dyn FnOnce(Result<String>) + Send>,
},
UpdateCache {
session_id: String,
entries: Vec<KVEntry>,
sender: Box<dyn FnOnce(Result<()>) + Send>,
},
PersistConversation {
session_id: String,
messages: Vec<Message>,
sender: Box<dyn FnOnce(Result<()>) + Send>,
},
Shutdown,
}Expand description
System-wide command types for thread communication
Variants§
Auto Trait Implementations§
impl Freeze for SystemCommand
impl !RefUnwindSafe for SystemCommand
impl Send for SystemCommand
impl !Sync for SystemCommand
impl Unpin for SystemCommand
impl UnsafeUnpin for SystemCommand
impl !UnwindSafe for SystemCommand
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