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.
Tuple Fields of ReadPreference
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.
Tuple Fields of Predicate
0: Predicate
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