pub enum ReplyKeyExpr {
Any,
MatchingQuery,
}unstable only.Expand description
The kinds of accepted query replies.
The Queryable may serve glob-like key expressions.
E.g., the queryable may be declared with the key expression foo/*.
At the same time, it may send replies with more specific key expressions, e.g., foo/bar or foo/baz.
This may cause a situation when the queryable receives a query with the key expression foo/bar
and replies to it with the key expression foo/baz.
By default, this behavior is not allowed. Calling Query::reply on
a query for foo/bar with key expression foo/baz will result in an error on the sending side.
But if the query is sent with the ReplyKeyExpr::Any parameter in accept_replies (for
Session::get or
accept_replies for
Querier::get)
then the reply with a disjoint key expression will be accepted for this query.
The Queryable may check this parameter with
Query::accepts_replies.
Variants§
Any
Accept replies whose key expressions may not match the query key expression.
MatchingQuery
Accept replies whose key expressions match the query key expression.
Trait Implementations§
Source§impl Clone for ReplyKeyExpr
impl Clone for ReplyKeyExpr
Source§fn clone(&self) -> ReplyKeyExpr
fn clone(&self) -> ReplyKeyExpr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReplyKeyExpr
impl Debug for ReplyKeyExpr
Source§impl Default for ReplyKeyExpr
impl Default for ReplyKeyExpr
Source§fn default() -> ReplyKeyExpr
fn default() -> ReplyKeyExpr
Source§impl<'de> Deserialize<'de> for ReplyKeyExpr
impl<'de> Deserialize<'de> for ReplyKeyExpr
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>,
Source§impl Hash for ReplyKeyExpr
impl Hash for ReplyKeyExpr
Source§impl PartialEq for ReplyKeyExpr
impl PartialEq for ReplyKeyExpr
impl Copy for ReplyKeyExpr
impl Eq for ReplyKeyExpr
impl StructuralPartialEq for ReplyKeyExpr
Auto Trait Implementations§
impl Freeze for ReplyKeyExpr
impl RefUnwindSafe for ReplyKeyExpr
impl Send for ReplyKeyExpr
impl Sync for ReplyKeyExpr
impl Unpin for ReplyKeyExpr
impl UnwindSafe for ReplyKeyExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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