pub struct Turn {
pub sender: Option<Sender>,
pub who: Who,
pub body: String,
pub at: Timestamp,
pub attachments: Vec<Attachment>,
pub usage: Option<TurnUsage>,
pub breaks: Option<Vec<usize>>,
pub messages: Vec<Message>,
pub posted_by: Option<String>,
}Expand description
One message in the conversation.
Fields§
§sender: Option<Sender>Display provenance; absent in legacy records.
who: WhoWho wrote it.
body: StringWhat they said.
at: TimestampWhen it was said.
attachments: Vec<Attachment>Images attached to this turn. #[serde(default)] so a conversation
recorded before attachments existed still reads.
usage: Option<TurnUsage>What the agent’s CLI reported reading for this reply; only ever set on
an agent reply that carried usage. #[serde(default)] so a
conversation recorded before this field existed still reads, which is
why SCHEMA stays put: no existing field changed meaning.
breaks: Option<Vec<usize>>Byte offsets in Self::body where the second and later messages of
an operator turn begin. Replies queued while a turn runs are joined
with a blank line, which an owner’s own blank lines cannot be told
apart from, so the boundary is recorded when it is made. Some(empty)
is one message; None is unknown (a turn stored before this field, or
not an operator turn) and readers fall back to paragraphs.
messages: Vec<Message>Individual sends; empty for legacy turns.
posted_by: Option<String>The run id of the task seat that appended this agent turn with
magi talk post. Only ever set on such a turn; the chat’s own CLI
session has not seen it, so posts_since_last_reply replays it in
the next prompt. #[serde(default)]: SCHEMA stays put.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Turn
impl<'de> Deserialize<'de> for Turn
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>,
impl Eq for Turn
impl StructuralPartialEq for Turn
Auto Trait Implementations§
impl Forget for Turn
impl Freeze for Turnwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Attachment>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Message>: Freeze,
impl Move for Turn
impl RefUnwindSafe for Turn
impl Send for Turnwhere
RawVecInner: Send,
impl Sync for Turnwhere
RawVecInner: Sync,
impl Unpin for Turn
impl UnsafeUnpin for Turnwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attachment>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Message>: UnsafeUnpin,
impl UnwindSafe for Turnwhere
RawVecInner: UnwindSafe,
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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