pub struct ContextItem { /* private fields */ }Expand description
A conversation message together with its position in the window.
The sequence number is assigned on insertion and never reused, so it identifies an item across compaction and reassembly even though both rewrite the surrounding window.
Implementations§
Source§impl ContextItem
impl ContextItem
Sourcepub const fn kept(&self) -> bool
pub const fn kept(&self) -> bool
Whether this tool result is part of an exchange kept verbatim through compaction.
Sourcepub const fn committed_at(&self) -> Timestamp
pub const fn committed_at(&self) -> Timestamp
The UTC time the item was committed to the window.
Sourcepub fn into_message(self) -> Message
pub fn into_message(self) -> Message
Consumes the item, returning its message.
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§impl Debug for ContextItem
impl Debug for ContextItem
Source§impl<'de> Deserialize<'de> for ContextItem
impl<'de> Deserialize<'de> for ContextItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextItem
Source§impl PartialEq for ContextItem
impl PartialEq for ContextItem
Source§impl Serialize for ContextItem
impl Serialize for ContextItem
impl StructuralPartialEq for ContextItem
Auto Trait Implementations§
impl Forget for ContextItem
impl Freeze for ContextItem
impl Move for ContextItem
impl RefUnwindSafe for ContextItem
impl Send for ContextItem
impl Sync for ContextItem
impl Unpin for ContextItem
impl UnsafeUnpin for ContextItem
impl UnwindSafe for ContextItem
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.