pub struct AnthropicMessagesStreamCodec;Expand description
Stream codec for Anthropic Messages events.
Trait Implementations§
Source§impl StreamCodec for AnthropicMessagesStreamCodec
impl StreamCodec for AnthropicMessagesStreamCodec
Source§fn decode_event(
&self,
state: &mut StreamTranslationState,
event: &Value,
) -> Vec<LlmResponseChunk>
fn decode_event( &self, state: &mut StreamTranslationState, event: &Value, ) -> Vec<LlmResponseChunk>
Decodes one provider event into zero or more neutral events.
Source§fn encode_event(
&self,
state: &mut StreamTranslationState,
event: LlmResponseChunk,
) -> Vec<Value>
fn encode_event( &self, state: &mut StreamTranslationState, event: LlmResponseChunk, ) -> Vec<Value>
Encodes one neutral event into zero or more provider events.
Source§fn observe_replayed_event(
&self,
state: &mut StreamTranslationState,
raw: &Value,
normalized: Vec<LlmResponseChunk>,
)
fn observe_replayed_event( &self, state: &mut StreamTranslationState, raw: &Value, normalized: Vec<LlmResponseChunk>, )
Advances encoder state after an exact same-format event replay. Read more
Auto Trait Implementations§
impl Freeze for AnthropicMessagesStreamCodec
impl RefUnwindSafe for AnthropicMessagesStreamCodec
impl Send for AnthropicMessagesStreamCodec
impl Sync for AnthropicMessagesStreamCodec
impl Unpin for AnthropicMessagesStreamCodec
impl UnsafeUnpin for AnthropicMessagesStreamCodec
impl UnwindSafe for AnthropicMessagesStreamCodec
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