pub struct StreamAnswerQuery(/* private fields */);conversational-search-service only.Expand description
The request builder for ConversationalSearchService::stream_answer_query calls.
§Example
let builder = prepare_request_builder();
let mut resp_stream = builder.send().await?;
while let Some(response) = resp_stream.next().await {
let response = response?;
println!("response {:?}", response);
}
fn prepare_request_builder() -> StreamAnswerQuery {
// ... details omitted ...
}Implementations§
Source§impl StreamAnswerQuery
impl StreamAnswerQuery
Sourcepub fn with_request<V: Into<AnswerQueryRequest>>(self, v: V) -> Self
pub fn with_request<V: Into<AnswerQueryRequest>>(self, v: V) -> Self
Sets the full request, replacing any prior values.
Sourcepub fn with_options<V: Into<RequestOptions>>(self, v: V) -> Self
pub fn with_options<V: Into<RequestOptions>>(self, v: V) -> Self
Sets all the options, replacing any prior values.
Sourcepub async fn send(self) -> Result<ResponseStream<AnswerQueryResponse>>
pub async fn send(self) -> Result<ResponseStream<AnswerQueryResponse>>
Initiates the server stream.
Sourcepub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
pub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
Sets the value of serving_config.
This is a required field for requests.
Sourcepub fn set_query<T>(self, v: T) -> Self
pub fn set_query<T>(self, v: T) -> Self
Sets the value of query.
This is a required field for requests.
Sourcepub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
Sets or clears the value of query.
This is a required field for requests.
Sourcepub fn set_session<T: Into<String>>(self, v: T) -> Self
pub fn set_session<T: Into<String>>(self, v: T) -> Self
Sets the value of session.
Sourcepub fn set_safety_spec<T>(self, v: T) -> Selfwhere
T: Into<SafetySpec>,
pub fn set_safety_spec<T>(self, v: T) -> Selfwhere
T: Into<SafetySpec>,
Sets the value of safety_spec.
Sourcepub fn set_or_clear_safety_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySpec>,
pub fn set_or_clear_safety_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySpec>,
Sets or clears the value of safety_spec.
Sets the value of related_questions_spec.
Sets or clears the value of related_questions_spec.
Sourcepub fn set_grounding_spec<T>(self, v: T) -> Selfwhere
T: Into<GroundingSpec>,
pub fn set_grounding_spec<T>(self, v: T) -> Selfwhere
T: Into<GroundingSpec>,
Sets the value of grounding_spec.
Sourcepub fn set_or_clear_grounding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingSpec>,
pub fn set_or_clear_grounding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingSpec>,
Sets or clears the value of grounding_spec.
Sourcepub fn set_answer_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<AnswerGenerationSpec>,
pub fn set_answer_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<AnswerGenerationSpec>,
Sets the value of answer_generation_spec.
Sourcepub fn set_or_clear_answer_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<AnswerGenerationSpec>,
pub fn set_or_clear_answer_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<AnswerGenerationSpec>,
Sets or clears the value of answer_generation_spec.
Sourcepub fn set_search_spec<T>(self, v: T) -> Selfwhere
T: Into<SearchSpec>,
pub fn set_search_spec<T>(self, v: T) -> Selfwhere
T: Into<SearchSpec>,
Sets the value of search_spec.
Sourcepub fn set_or_clear_search_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SearchSpec>,
pub fn set_or_clear_search_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SearchSpec>,
Sets or clears the value of search_spec.
Sourcepub fn set_query_understanding_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
pub fn set_query_understanding_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
Sets the value of query_understanding_spec.
Sourcepub fn set_or_clear_query_understanding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
pub fn set_or_clear_query_understanding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
Sets or clears the value of query_understanding_spec.
Sourcepub fn set_asynchronous_mode<T: Into<bool>>(self, v: T) -> Self
👎Deprecated
pub fn set_asynchronous_mode<T: Into<bool>>(self, v: T) -> Self
Sets the value of asynchronous_mode.
Sourcepub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self
pub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self
Sets the value of user_pseudo_id.
Sourcepub fn set_user_labels<T, K, V>(self, v: T) -> Self
pub fn set_user_labels<T, K, V>(self, v: T) -> Self
Sets the value of user_labels.
Sourcepub fn set_end_user_spec<T>(self, v: T) -> Selfwhere
T: Into<EndUserSpec>,
pub fn set_end_user_spec<T>(self, v: T) -> Selfwhere
T: Into<EndUserSpec>,
Sets the value of end_user_spec.
Sourcepub fn set_or_clear_end_user_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndUserSpec>,
pub fn set_or_clear_end_user_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndUserSpec>,
Sets or clears the value of end_user_spec.
Trait Implementations§
Source§impl Clone for StreamAnswerQuery
impl Clone for StreamAnswerQuery
Auto Trait Implementations§
impl !RefUnwindSafe for StreamAnswerQuery
impl !UnwindSafe for StreamAnswerQuery
impl Freeze for StreamAnswerQuery
impl Send for StreamAnswerQuery
impl Sync for StreamAnswerQuery
impl Unpin for StreamAnswerQuery
impl UnsafeUnpin for StreamAnswerQuery
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RequestOptionsBuilder for Twhere
T: RequestBuilder,
impl<T> RequestOptionsBuilder for Twhere
T: RequestBuilder,
Source§fn with_idempotency(self, v: bool) -> T
fn with_idempotency(self, v: bool) -> T
v is true, treat the RPC underlying this method as idempotent.