pub struct InteractionResume {
pub provider: GeminiConfig,
pub interaction_id: String,
pub last_event_id: Option<String>,
}Expand description
Read an existing interaction resource or resume its event stream.
Unary mode retrieves the resource once. Streaming mode resumes after
last_event_id, or from the beginning if no event id is supplied.
Fields§
§provider: GeminiConfigThe key and the API root.
interaction_id: StringThe interaction to read.
last_event_id: Option<String>The last event the consumer saw, so a resumed stream does not
redeliver it. None resumes from the beginning, as the API defaults.
Implementations§
Source§impl InteractionResume
impl InteractionResume
Sourcepub fn new(provider: GeminiConfig, interaction_id: impl Into<String>) -> Self
pub fn new(provider: GeminiConfig, interaction_id: impl Into<String>) -> Self
The wire for the interaction interaction_id.
Sourcepub fn after_event(self, last_event_id: impl Into<String>) -> Self
pub fn after_event(self, last_event_id: impl Into<String>) -> Self
Resume a streamed read after the event last_event_id.
Trait Implementations§
Source§impl Clone for InteractionResume
impl Clone for InteractionResume
Source§impl Debug for InteractionResume
impl Debug for InteractionResume
Source§impl<'de> Deserialize<'de> for InteractionResume
impl<'de> Deserialize<'de> for InteractionResume
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
Source§impl PartialEq for InteractionResume
impl PartialEq for InteractionResume
Source§impl Serialize for InteractionResume
impl Serialize for InteractionResume
impl StructuralPartialEq for InteractionResume
Source§impl Wire for InteractionResume
impl Wire for InteractionResume
Source§fn describe(&self) -> Descriptor<'_>
fn describe(&self) -> Descriptor<'_>
The interaction names its own model; this wire addresses no model id.
Source§fn encode(
&self,
_request: CompletionRequest,
mode: Mode,
) -> Result<Encoded, EncodeError>
fn encode( &self, _request: CompletionRequest, mode: Mode, ) -> Result<Encoded, EncodeError>
Reads an existing interaction, so the request carries no body and the
CompletionRequest contributes nothing: what to read is the wire’s
own data.
Source§type Op = Completion
type Op = Completion
The operation this wire performs.
Source§type Payload = Encoded
type Payload = Encoded
What
Self::encode produces for the transport to send.Source§type Decoder<'id> = InteractionsDecoder<'id>
type Decoder<'id> = InteractionsDecoder<'id>
The decoder for one of its replies, branded with that reply.
Auto Trait Implementations§
impl Freeze for InteractionResume
impl RefUnwindSafe for InteractionResume
impl Send for InteractionResume
impl Sync for InteractionResume
impl Unpin for InteractionResume
impl UnsafeUnpin for InteractionResume
impl UnwindSafe for InteractionResume
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
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> 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 moreSource§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.