pub struct Inbox { /* private fields */ }Expand description
Inbox Manager
Manages the message inbox for task results.
Implementations§
Source§impl Inbox
impl Inbox
Sourcepub fn get_messages(&self, unread_only: bool, limit: usize) -> Vec<InboxMessage>
pub fn get_messages(&self, unread_only: bool, limit: usize) -> Vec<InboxMessage>
Get messages
§Arguments
unread_only- If true, only return unread messageslimit- Maximum number of messages to return
Sourcepub fn mark_all_read(&self)
pub fn mark_all_read(&self)
Mark all messages as read
Sourcepub fn get_unread_count(&self) -> usize
pub fn get_unread_count(&self) -> usize
Get unread message count
Sourcepub fn add_message(&self, task_id: &str, from_role: &str, content: &str)
pub fn add_message(&self, task_id: &str, from_role: &str, content: &str)
Add a message to the inbox
Auto Trait Implementations§
impl !RefUnwindSafe for Inbox
impl !Send for Inbox
impl !Sync for Inbox
impl !UnwindSafe for Inbox
impl Freeze for Inbox
impl Unpin for Inbox
impl UnsafeUnpin for Inbox
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.