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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ReadPreference(ReadPreference)
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)
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V