pub struct Query<'a, T> { /* private fields */ }Expand description
Request builder returned by Client::query and Client::execute.
Supports .on_master(bool), .bucket_id(u64) and .instance(&str) before .await.
Implementations§
Source§impl<'a, T> Query<'a, T>
impl<'a, T> Query<'a, T>
Sourcepub fn on_master(self, on_master: bool) -> RoutedQuery<'a, T>
pub fn on_master(self, on_master: bool) -> RoutedQuery<'a, T>
Routes the query to master or replica. Defaults to true (master).
Sourcepub fn bucket_id(self, bucket_id: u64) -> RoutedQuery<'a, T>
pub fn bucket_id(self, bucket_id: u64) -> RoutedQuery<'a, T>
Forces routing to a specific bucket_id, bypassing automatic computation.
Sourcepub fn instance(self, name: &'a str) -> PinnedQuery<'a, T>
pub fn instance(self, name: &'a str) -> PinnedQuery<'a, T>
Pins the query to the named instance. Fails if it is unknown or offline.
Trait Implementations§
Source§impl<'a> IntoFuture for Query<'a, Vec<Row>>
impl<'a> IntoFuture for Query<'a, Vec<Row>>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <Query<'a, Vec<Row>> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <Query<'a, Vec<Row>> 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
Source§impl<'a> IntoFuture for Query<'a, u64>
impl<'a> IntoFuture for Query<'a, u64>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <Query<'a, u64> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <Query<'a, u64> 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, T> !RefUnwindSafe for Query<'a, T>
impl<'a, T> !UnwindSafe for Query<'a, T>
impl<'a, T> Freeze for Query<'a, T>where
PhantomData<T>: Freeze,
impl<'a, T> Send for Query<'a, T>where
PhantomData<T>: Send,
impl<'a, T> Sync for Query<'a, T>where
PhantomData<T>: Sync,
impl<'a, T> Unpin for Query<'a, T>where
PhantomData<T>: Unpin,
impl<'a, T> UnsafeUnpin for Query<'a, T>where
PhantomData<T>: UnsafeUnpin,
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