pub struct Message { /* private fields */ }Expand description
An enriched message in a Honcho workspace.
Wraps the raw MessageResponse with workspace context and provides
convenient field accessors.
Implementations§
Source§impl Message
impl Message
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
ID of the session this message belongs to.
Sourcepub fn metadata(&self) -> &HashMap<String, Value>
pub fn metadata(&self) -> &HashMap<String, Value>
Arbitrary key-value metadata attached to the message.
Sourcepub fn created_at(&self) -> &DateTime<Utc>
pub fn created_at(&self) -> &DateTime<Utc>
When this message was created.
Sourcepub fn token_count(&self) -> u64
pub fn token_count(&self) -> u64
Token count for the message content.
Sourcepub fn workspace_id(&self) -> &str
pub fn workspace_id(&self) -> &str
The workspace this message belongs to.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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