pub enum ContentDelta {
TextDelta {
text: String,
},
InputJsonDelta {
partial_json: String,
},
ThinkingDelta {
thinking: String,
},
SignatureDelta {
signature: String,
},
CitationsDelta {
citation: Citation,
},
Unknown(Value),
}Variants§
TextDelta
InputJsonDelta
ThinkingDelta
SignatureDelta
CitationsDelta
Unknown(Value)
Any nested delta type this client doesn’t model. Anthropic’s
versioning policy reserves the right to add new delta types without
notice, so an unmodeled nested tag must not fail the whole
content_block_delta frame (which would classify it Corrupt and
surface an Err item per frame). It decodes to a no-op, warned at the
interpret site — the same shape as
ContentPartChunkPart::Unknown.
Trait Implementations§
Source§impl Debug for ContentDelta
impl Debug for ContentDelta
Source§impl<'de> Deserialize<'de> for ContentDelta
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 delta. Here a known delta tag must decode
fully or error (the frame classifies Corrupt); only an unmodeled (or
absent) tag falls back to ContentDelta::Unknown, preserving the value
verbatim. Same pattern as ContentPartChunkPart’s hand dispatch in
openai/responses_api/streaming.rs.
impl<'de> Deserialize<'de> for ContentDelta
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 delta. Here a known delta tag must decode
fully or error (the frame classifies Corrupt); only an unmodeled (or
absent) tag falls back to ContentDelta::Unknown, preserving the value
verbatim. Same pattern as ContentPartChunkPart’s hand dispatch in
openai/responses_api/streaming.rs.
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 ContentDelta
impl RefUnwindSafe for ContentDelta
impl Send for ContentDelta
impl Sync for ContentDelta
impl Unpin for ContentDelta
impl UnsafeUnpin for ContentDelta
impl UnwindSafe for ContentDelta
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
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