pub enum ContentPartChunkPart {
OutputText {
text: String,
},
SummaryText {
text: String,
},
Unknown(Value),
}Variants§
OutputText
SummaryText
Unknown(Value)
Any part type this client doesn’t model — refusal and
reasoning_text parts appear on real refusal/reasoning-text turns,
and new part types ship without notice. Content-part events are
bookkeeping (the content itself arrives via the corresponding delta
events, e.g. response.refusal.delta), so an unmodeled part must
parse as a no-op rather than fail the whole chunk — the same shape as
Output::Unknown.
Trait Implementations§
Source§impl Clone for ContentPartChunkPart
impl Clone for ContentPartChunkPart
Source§fn clone(&self) -> ContentPartChunkPart
fn clone(&self) -> ContentPartChunkPart
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContentPartChunkPart
impl Debug for ContentPartChunkPart
Source§impl<'de> Deserialize<'de> for ContentPartChunkPart
Hand-written tag dispatch instead of a trailing #[serde(untagged)]
variant: on an internally-tagged enum the untagged fallback also swallows
a known tag with an invalid payload, silently demoting a data-level
defect to a skippable unknown part
(rig-2257-code-review-findings-34ee8ba5.md P2). Here a known part tag
must decode fully or error; only an unmodeled (or absent) tag falls back
to ContentPartChunkPart::Unknown, preserving the value verbatim.
impl<'de> Deserialize<'de> for ContentPartChunkPart
Hand-written tag dispatch instead of a trailing #[serde(untagged)]
variant: on an internally-tagged enum the untagged fallback also swallows
a known tag with an invalid payload, silently demoting a data-level
defect to a skippable unknown part
(rig-2257-code-review-findings-34ee8ba5.md P2). Here a known part tag
must decode fully or error; only an unmodeled (or absent) tag falls back
to ContentPartChunkPart::Unknown, preserving the value verbatim.
Two documented edges of the hand dispatch (#2258 F8):
- A part with duplicate
typekeys dispatches on the last occurrence, becauseserde_json::Valuekeeps the last duplicate, while a derived internally-tagged enum takes the first. Duplicate keys are not something any Responses gateway emits; the divergence is accepted and pinned by test rather than papered over with a custom map visitor. - A non-string
typeis a data-level defect of the tagged shape, not an unmodeled part kind: it errors (classifying the frameCorrupt) instead of degrading to anUnknownno-op.