pub struct ChatProjection {
pub actors: Vec<ActorView>,
pub cursor: ChatCursor,
pub head: Option<i32>,
pub path_id: String,
pub step_ids: Vec<String>,
pub title: Option<String>,
pub turns: Vec<ChatTurn>,
}Expand description
Top-level chat-projection response. Densely-indexed (u32 IDs into
turns / actors) so JSON parsing is cheap and the wire shape
avoids duplicating actor strings on every turn.
JSON schema
{
"description": "Top-level chat-projection response. Densely-indexed (`u32` IDs into\n`turns` / `actors`) so JSON parsing is cheap and the wire shape\navoids duplicating actor strings on every turn.",
"type": "object",
"required": [
"actors",
"cursor",
"path_id",
"step_ids",
"turns"
],
"properties": {
"actors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActorView"
}
},
"cursor": {
"$ref": "#/components/schemas/ChatCursor"
},
"head": {
"description": "Index into `turns` — the latest turn along the HEAD chain. `None`\nwhen the document has no head.",
"type": [
"integer",
"null"
],
"format": "int32",
"minimum": 0.0
},
"path_id": {
"type": "string"
},
"step_ids": {
"description": "Canonical step IDs parallel to `turns`, for deep-links and\n`/step/{id}` fetches.",
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"type": [
"string",
"null"
]
},
"turns": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatTurn"
}
}
}
}Fields§
§actors: Vec<ActorView>§cursor: ChatCursor§head: Option<i32>Index into turns — the latest turn along the HEAD chain. None
when the document has no head.
path_id: String§step_ids: Vec<String>Canonical step IDs parallel to turns, for deep-links and
/step/{id} fetches.
title: Option<String>§turns: Vec<ChatTurn>Trait Implementations§
Source§impl Clone for ChatProjection
impl Clone for ChatProjection
Source§fn clone(&self) -> ChatProjection
fn clone(&self) -> ChatProjection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChatProjection
impl Debug for ChatProjection
Source§impl<'de> Deserialize<'de> for ChatProjection
impl<'de> Deserialize<'de> for ChatProjection
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
Auto Trait Implementations§
impl Freeze for ChatProjection
impl RefUnwindSafe for ChatProjection
impl Send for ChatProjection
impl Sync for ChatProjection
impl Unpin for ChatProjection
impl UnsafeUnpin for ChatProjection
impl UnwindSafe for ChatProjection
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