Enum mongodb::options::SelectionCriteria [−][src]
#[non_exhaustive]
pub enum SelectionCriteria {
ReadPreference(ReadPreference),
Predicate(Predicate),
}
Expand description
Describes which servers are suitable for a given operation.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
ReadPreference(ReadPreference)
Tuple Fields
A read preference that describes the suitable servers based on the server type, max staleness, and server tags.
See the documentation here for more details.
Predicate(Predicate)
Tuple Fields
0: Predicate
A predicate used to filter servers that are considered suitable. A server
will be
considered suitable by a predicate
if predicate(server)
returns true.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for SelectionCriteria
impl Send for SelectionCriteria
impl Sync for SelectionCriteria
impl Unpin for SelectionCriteria
impl !UnwindSafe for SelectionCriteria
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more