pub struct CreateSearchRequest<'a> {
pub documents: Option<Vec<String>>,
pub engine_id: String,
pub file: Option<String>,
pub max_rerank: Option<i64>,
pub query: String,
pub return_metadata: Option<bool>,
pub user: Option<String>,
/* private fields */
}
Expand description
Create this with the associated client method.
That method takes required values as arguments. Set optional values using builder methods on this struct.
Fields§
§documents: Option<Vec<String>>
§engine_id: String
§file: Option<String>
§max_rerank: Option<i64>
§query: String
§return_metadata: Option<bool>
§user: Option<String>
Implementations§
Source§impl<'a> CreateSearchRequest<'a>
impl<'a> CreateSearchRequest<'a>
pub async fn send(self) -> InMemoryResult<CreateSearchResponse>
pub fn documents( self, documents: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self
pub fn file(self, file: &str) -> Self
pub fn max_rerank(self, max_rerank: i64) -> Self
pub fn return_metadata(self, return_metadata: bool) -> Self
pub fn user(self, user: &str) -> Self
Trait Implementations§
Source§impl<'a> Clone for CreateSearchRequest<'a>
impl<'a> Clone for CreateSearchRequest<'a>
Source§fn clone(&self) -> CreateSearchRequest<'a>
fn clone(&self) -> CreateSearchRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> IntoFuture for CreateSearchRequest<'a>
impl<'a> IntoFuture for CreateSearchRequest<'a>
Source§type Output = Result<CreateSearchResponse, Error<InMemoryBody>>
type Output = Result<CreateSearchResponse, Error<InMemoryBody>>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CreateSearchRequest<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CreateSearchRequest<'a> as IntoFuture>::Output> + Send + 'a>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> Freeze for CreateSearchRequest<'a>
impl<'a> !RefUnwindSafe for CreateSearchRequest<'a>
impl<'a> Send for CreateSearchRequest<'a>
impl<'a> Sync for CreateSearchRequest<'a>
impl<'a> Unpin for CreateSearchRequest<'a>
impl<'a> !UnwindSafe for CreateSearchRequest<'a>
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