Struct mongodb::options::DistinctOptions
source · [−]#[non_exhaustive]pub struct DistinctOptions {
pub max_time: Option<Duration>,
pub selection_criteria: Option<SelectionCriteria>,
pub read_concern: Option<ReadConcern>,
pub collation: Option<Collation>,
}
Expand description
Specifies the options to a Collection::distinct
operation.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.max_time: Option<Duration>
The maximum amount of time to allow the query to run.
This options maps to the maxTimeMS
MongoDB query option, so the duration will be sent
across the wire as an integer number of milliseconds.
selection_criteria: Option<SelectionCriteria>
The criteria used to select a server for this operation.
If none specified, the default set on the collection will be used.
read_concern: Option<ReadConcern>
The level of the read concern.
collation: Option<Collation>
The collation to use for the operation.
See the documentation for more information on how to use this option.
Implementations
sourceimpl DistinctOptions
impl DistinctOptions
sourcepub fn builder() -> DistinctOptionsBuilder<((), (), (), ())>
pub fn builder() -> DistinctOptionsBuilder<((), (), (), ())>
Create a builder for building DistinctOptions
.
On the builder, call .max_time(...)
(optional), .selection_criteria(...)
(optional), .read_concern(...)
(optional), .collation(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of DistinctOptions
.
Trait Implementations
sourceimpl Clone for DistinctOptions
impl Clone for DistinctOptions
sourcefn clone(&self) -> DistinctOptions
fn clone(&self) -> DistinctOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DistinctOptions
impl Debug for DistinctOptions
sourceimpl Default for DistinctOptions
impl Default for DistinctOptions
sourcefn default() -> DistinctOptions
fn default() -> DistinctOptions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for DistinctOptions
impl<'de> Deserialize<'de> for DistinctOptions
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for DistinctOptions
impl Serialize for DistinctOptions
Auto Trait Implementations
impl !RefUnwindSafe for DistinctOptions
impl Send for DistinctOptions
impl Sync for DistinctOptions
impl Unpin for DistinctOptions
impl !UnwindSafe for DistinctOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more