pub struct InteractionsDecoder { /* private fields */ }Expand description
The Gemini Interactions wire’s decoder. Steps decode in step order: a
thought, a call and any other step is one block, and a model output is
one block per content item, whose provider item is the model output step
holding that item alone. A step opens on step.start, grows with its
step.deltas, and becomes its blocks’ provider item on step.stop, where
the API states it complete. A whole interaction states each step
complete. A step still open when the reply ends keeps no provider item.
A text item’s annotations, stated with it or streamed after it, cite its
block when the step stops.
Trait Implementations§
Source§impl<'id> Decoder<'id, Completion> for InteractionsDecoder
EOF without interaction.completed is truncation, not successful
completion, so the decoder has nothing to add at the end of the reply.
impl<'id> Decoder<'id, Completion> for InteractionsDecoder
EOF without interaction.completed is truncation, not successful
completion, so the decoder has nothing to add at the end of the reply.
Source§fn classify(&self, frame: WireFrame) -> WireEvent<InteractionsEvent>
fn classify(&self, frame: WireFrame) -> WireEvent<InteractionsEvent>
Classify a frame by its event_type tag, or as a whole resource by
its marker keys when it carries no tag. A tagged frame never passes
for a whole resource.
Source§type Event = InteractionsEvent
type Event = InteractionsEvent
Source§fn decode(
&mut self,
event: InteractionsEvent,
out: Out<'id, Completion>,
) -> Result<Flow, ProviderError>
fn decode( &mut self, event: InteractionsEvent, out: Out<'id, Completion>, ) -> Result<Flow, ProviderError>
Known event into the reply. An error ends the reply with
it.Auto Trait Implementations§
impl Freeze for InteractionsDecoder
impl RefUnwindSafe for InteractionsDecoder
impl Send for InteractionsDecoder
impl Sync for InteractionsDecoder
impl Unpin for InteractionsDecoder
impl UnsafeUnpin for InteractionsDecoder
impl UnwindSafe for InteractionsDecoder
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> 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