pub struct Turn {
pub completed_at: Option<i64>,
pub duration_ms: Option<i64>,
pub error: Option<TurnError>,
pub id: String,
pub items: Vec<ThreadItem>,
pub items_view: TurnItemsView,
pub started_at: Option<i64>,
pub status: TurnStatus,
}Expand description
Turn
JSON schema
{
"type": "object",
"required": [
"id",
"items",
"status"
],
"properties": {
"completedAt": {
"description": "Unix timestamp (in seconds) when the turn completed.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"durationMs": {
"description": "Duration between turn start and completion in milliseconds, if known.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"error": {
"description": "Only populated when the Turn's status is failed.",
"anyOf": [
{
"$ref": "#/definitions/TurnError"
},
{
"type": "null"
}
]
},
"id": {
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
"type": "string"
},
"items": {
"description": "Thread items currently included in this turn payload.",
"type": "array",
"items": {
"$ref": "#/definitions/ThreadItem"
}
},
"itemsView": {
"description": "Describes how much of `items` has been loaded for this turn.",
"default": "full",
"allOf": [
{
"$ref": "#/definitions/TurnItemsView"
}
]
},
"startedAt": {
"description": "Unix timestamp (in seconds) when the turn started.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"status": {
"$ref": "#/definitions/TurnStatus"
}
}
}Fields§
§completed_at: Option<i64>Unix timestamp (in seconds) when the turn completed.
duration_ms: Option<i64>Duration between turn start and completion in milliseconds, if known.
error: Option<TurnError>Only populated when the Turn’s status is failed.
id: StringIdentifier for this turn. Codex-generated turn IDs are UUIDv7.
items: Vec<ThreadItem>Thread items currently included in this turn payload.
items_view: TurnItemsViewDescribes how much of items has been loaded for this turn.
started_at: Option<i64>Unix timestamp (in seconds) when the turn started.
status: TurnStatusTrait 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Turn
impl RefUnwindSafe for Turn
impl Send for Turn
impl Sync for Turn
impl Unpin for Turn
impl UnsafeUnpin for Turn
impl UnwindSafe for Turn
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