pub struct QuerierBuilder<'a, 'b> { /* private fields */ }
Expand description
A builder for initializing a querier
.
§Examples
use zenoh::{query::{ConsolidationMode, QueryTarget}};
let session = zenoh::open(zenoh::Config::default()).await.unwrap();
let querier = session.declare_querier("key/expression")
.target(QueryTarget::All)
.consolidation(ConsolidationMode::None)
.await
.unwrap();
let replies = querier.get()
.parameters("value>1")
.await
.unwrap();
while let Ok(reply) = replies.recv_async().await {
println!("Received {:?}", reply.result())
}
Implementations§
Source§impl QuerierBuilder<'_, '_>
impl QuerierBuilder<'_, '_>
pub fn congestion_control(self, congestion_control: CongestionControl) -> Self
pub fn priority(self, priority: Priority) -> Self
pub fn express(self, is_express: bool) -> Self
Source§impl QuerierBuilder<'_, '_>
impl QuerierBuilder<'_, '_>
Sourcepub fn target(self, target: QueryTarget) -> Self
pub fn target(self, target: QueryTarget) -> Self
Change the target of the querier queries.
Sourcepub fn consolidation<QC: Into<QueryConsolidation>>(
self,
consolidation: QC,
) -> Self
pub fn consolidation<QC: Into<QueryConsolidation>>( self, consolidation: QC, ) -> Self
Change the consolidation mode of the querier queries.
Sourcepub fn allowed_destination(self, destination: Locality) -> Self
pub fn allowed_destination(self, destination: Locality) -> Self
Restrict the matching queryables that will receive the queries
to the ones that have the given Locality
.
Sourcepub fn accept_replies(self, accept: ReplyKeyExpr) -> Self
Available on crate feature unstable
only.
pub fn accept_replies(self, accept: ReplyKeyExpr) -> Self
unstable
only.By default, only replies whose key expressions intersect
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
with the querier key expression will be received by calls to [`Querier::get`](crate::query::Querier::get) method.
If allowed to through accept_replies(ReplyKeyExpr::Any)
, queryables may also reply on key
expressions that don’t intersect with the querier’s queries.
Trait Implementations§
Source§impl<'a, 'b> Debug for QuerierBuilder<'a, 'b>
impl<'a, 'b> Debug for QuerierBuilder<'a, 'b>
Source§impl IntoFuture for QuerierBuilder<'_, '_>
impl IntoFuture for QuerierBuilder<'_, '_>
Source§type Output = <QuerierBuilder<'_, '_> as Resolvable>::To
type Output = <QuerierBuilder<'_, '_> as Resolvable>::To
The output that the future will produce on completion.
Source§type IntoFuture = Ready<<QuerierBuilder<'_, '_> as Resolvable>::To>
type IntoFuture = Ready<<QuerierBuilder<'_, '_> as Resolvable>::To>
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<'b> Resolvable for QuerierBuilder<'_, 'b>
impl<'b> Resolvable for QuerierBuilder<'_, 'b>
Source§impl Wait for QuerierBuilder<'_, '_>
impl Wait for QuerierBuilder<'_, '_>
Source§fn wait(self) -> <Self as Resolvable>::To
fn wait(self) -> <Self as Resolvable>::To
Synchronously execute and wait
Auto Trait Implementations§
impl<'a, 'b> Freeze for QuerierBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for QuerierBuilder<'a, 'b>
impl<'a, 'b> Send for QuerierBuilder<'a, 'b>
impl<'a, 'b> Sync for QuerierBuilder<'a, 'b>
impl<'a, 'b> Unpin for QuerierBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for QuerierBuilder<'a, 'b>
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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