pub struct QueryParam<I> { /* private fields */ }
Expand description
Provided to Serf::query
to configure the parameters of the
query. If not provided, sane defaults will be used.
Implementations§
Source§impl<I> QueryParam<I>
impl<I> QueryParam<I>
Sourcepub const fn request_ack(&self) -> bool
pub const fn request_ack(&self) -> bool
Returns if we are requesting an delivery acknowledgement from every node that meets the filter requirement. This means nodes the receive the message but do not pass the filters, will not send an ack.
Sourcepub const fn relay_factor(&self) -> u8
pub const fn relay_factor(&self) -> u8
Returns the number of duplicate responses to relay back to the sender through other nodes for redundancy.
Sourcepub const fn timeout(&self) -> Duration
pub const fn timeout(&self) -> Duration
Returns timeout limits how long the query is left open. If not provided, then a default timeout is used based on the configuration of Serf
Sourcepub fn with_filters(self, val: TinyVec<Filter<I>>) -> Self
pub fn with_filters(self, val: TinyVec<Filter<I>>) -> Self
Sets the filters of the query
Sourcepub fn with_request_ack(self, val: bool) -> Self
pub fn with_request_ack(self, val: bool) -> Self
Sets if we are requesting an delivery acknowledgement from every node that meets the filter requirement. This means nodes the receive the message but do not pass the filters, will not send an ack.
Sourcepub fn with_relay_factor(self, val: u8) -> Self
pub fn with_relay_factor(self, val: u8) -> Self
Sets the number of duplicate responses to relay back to the sender through other nodes for redundancy.
Sourcepub fn with_timeout(self, val: Duration) -> Self
pub fn with_timeout(self, val: Duration) -> Self
Sets timeout limits how long the query is left open.
Trait Implementations§
Source§impl<I: Clone> Clone for QueryParam<I>
impl<I: Clone> Clone for QueryParam<I>
Source§fn clone(&self) -> QueryParam<I>
fn clone(&self) -> QueryParam<I>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<I: Debug> Debug for QueryParam<I>
impl<I: Debug> Debug for QueryParam<I>
Source§impl<'de, I> Deserialize<'de> for QueryParam<I>where
I: Deserialize<'de>,
impl<'de, I> Deserialize<'de> for QueryParam<I>where
I: Deserialize<'de>,
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>,
Auto Trait Implementations§
impl<I> Freeze for QueryParam<I>where
I: Freeze,
impl<I> RefUnwindSafe for QueryParam<I>where
I: RefUnwindSafe,
impl<I> Send for QueryParam<I>where
I: Send,
impl<I> Sync for QueryParam<I>where
I: Sync,
impl<I> Unpin for QueryParam<I>where
I: Unpin,
impl<I> UnwindSafe for QueryParam<I>where
I: RefUnwindSafe + UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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