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.
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>,
Auto Trait Implementations§
impl Freeze for ContentPartChunkPart
impl RefUnwindSafe for ContentPartChunkPart
impl Send for ContentPartChunkPart
impl Sync for ContentPartChunkPart
impl Unpin for ContentPartChunkPart
impl UnsafeUnpin for ContentPartChunkPart
impl UnwindSafe for ContentPartChunkPart
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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> 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