pub struct GenerateContentChunk(pub Map<String, Value>);Expand description
A GenerateContent reply document in REST JSON: the whole
generateContent body or one streamGenerateContent chunk.
Tuple Fields§
§0: Map<String, Value>Trait Implementations§
Source§impl Debug for GenerateContentChunk
impl Debug for GenerateContentChunk
Source§impl<'id> Decoder<'id, Completion, GenerateContentChunk> for GenerateContentDecoder
A transport that delivers each reply message as its REST chunk, such as
an SDK’s reply transcoded once, hands the decoder the chunk itself.
impl<'id> Decoder<'id, Completion, GenerateContentChunk> for GenerateContentDecoder
A transport that delivers each reply message as its REST chunk, such as an SDK’s reply transcoded once, hands the decoder the chunk itself.
Source§type Event = GenerateContentChunk
type Event = GenerateContentChunk
The wire’s typed event, produced by this decoder’s classifier.
Source§fn classify(
&self,
chunk: GenerateContentChunk,
) -> WireEvent<GenerateContentChunk>
fn classify( &self, chunk: GenerateContentChunk, ) -> WireEvent<GenerateContentChunk>
Decode and classify one frame. A JSON wire MUST delegate to a
classifier in
crate::providers::internal::wire, so the
decode-then-validate policy is not re-derived per provider.Source§fn decode(
&mut self,
chunk: GenerateContentChunk,
out: Out<'id, Completion>,
) -> Result<Flow, ProviderError>
fn decode( &mut self, chunk: GenerateContentChunk, out: Out<'id, Completion>, ) -> Result<Flow, ProviderError>
Write one
Known event into the reply. An error ends the reply with
it.Source§fn eof(&mut self, out: Out<'id, Completion>) -> Result<Flow, ProviderError>
fn eof(&mut self, out: Out<'id, Completion>) -> Result<Flow, ProviderError>
The frames ran out without an end. A decoder that already saw the
provider’s end, in a form the provider sends before its last frame,
ends the reply here; otherwise the reply is truncated.
Source§impl Default for GenerateContentChunk
impl Default for GenerateContentChunk
Source§impl<'de> Deserialize<'de> for GenerateContentChunk
impl<'de> Deserialize<'de> for GenerateContentChunk
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GenerateContentChunk
impl RefUnwindSafe for GenerateContentChunk
impl Send for GenerateContentChunk
impl Sync for GenerateContentChunk
impl Unpin for GenerateContentChunk
impl UnsafeUnpin for GenerateContentChunk
impl UnwindSafe for GenerateContentChunk
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
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> 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> ⓘ
Converts
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> ⓘ
Converts
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