[]Struct mongodb::wire_protocol::flags::OpQueryFlags

pub struct OpQueryFlags { /* fields omitted */ }

Represents the bit vector of flags for an OP_QUERY message.

Methods

impl OpQueryFlags

pub const TAILABLE_CURSOR: OpQueryFlags

pub const SLAVE_OK: OpQueryFlags

pub const OPLOG_RELAY: OpQueryFlags

pub const NO_CURSOR_TIMEOUT: OpQueryFlags

pub const AWAIT_DATA: OpQueryFlags

pub const EXHAUST: OpQueryFlags

pub const PARTIAL: OpQueryFlags

pub const fn empty() -> OpQueryFlags

Returns an empty set of flags

pub const fn all() -> OpQueryFlags

Returns the set containing all flags.

pub const fn bits(&self) -> i32

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: i32) -> Option<OpQueryFlags>

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: i32) -> OpQueryFlags

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

pub const fn intersects(&self, other: OpQueryFlags) -> bool

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: OpQueryFlags) -> bool

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: OpQueryFlags)

Inserts the specified flags in-place.

pub fn remove(&mut self, other: OpQueryFlags)

Removes the specified flags in-place.

pub fn toggle(&mut self, other: OpQueryFlags)

Toggles the specified flags in-place.

pub fn set(&mut self, other: OpQueryFlags, value: bool)

Inserts or removes the specified flags depending on the passed value.

impl OpQueryFlags[src]

pub fn with_find_options(options: &FindOptions) -> OpQueryFlags[src]

Constructs a new struct with flags based on a FindOptions struct.

Arguments

options - Struct whose fields contain the flags to initialize the new OpQueryFlags with

Return value

Returns the newly created OpQueryFlags struct.

Trait Implementations

impl Eq for OpQueryFlags

impl Extend<OpQueryFlags> for OpQueryFlags

impl Clone for OpQueryFlags

impl PartialOrd<OpQueryFlags> for OpQueryFlags

impl Ord for OpQueryFlags

impl PartialEq<OpQueryFlags> for OpQueryFlags

impl Copy for OpQueryFlags

impl Hash for OpQueryFlags

impl Sub<OpQueryFlags> for OpQueryFlags

type Output = OpQueryFlags

The resulting type after applying the - operator.

fn sub(self, other: OpQueryFlags) -> OpQueryFlags

Returns the set difference of the two sets of flags.

impl SubAssign<OpQueryFlags> for OpQueryFlags

fn sub_assign(&mut self, other: OpQueryFlags)

Disables all flags enabled in the set.

impl Not for OpQueryFlags

type Output = OpQueryFlags

The resulting type after applying the ! operator.

fn not(self) -> OpQueryFlags

Returns the complement of this set of flags.

impl BitAnd<OpQueryFlags> for OpQueryFlags

type Output = OpQueryFlags

The resulting type after applying the & operator.

fn bitand(self, other: OpQueryFlags) -> OpQueryFlags

Returns the intersection between the two sets of flags.

impl BitOr<OpQueryFlags> for OpQueryFlags

type Output = OpQueryFlags

The resulting type after applying the | operator.

fn bitor(self, other: OpQueryFlags) -> OpQueryFlags

Returns the union of the two sets of flags.

impl BitXor<OpQueryFlags> for OpQueryFlags

type Output = OpQueryFlags

The resulting type after applying the ^ operator.

fn bitxor(self, other: OpQueryFlags) -> OpQueryFlags

Returns the left flags, but with all the right flags toggled.

impl BitAndAssign<OpQueryFlags> for OpQueryFlags

fn bitand_assign(&mut self, other: OpQueryFlags)

Disables all flags disabled in the set.

impl BitOrAssign<OpQueryFlags> for OpQueryFlags

fn bitor_assign(&mut self, other: OpQueryFlags)

Adds the set of flags.

impl BitXorAssign<OpQueryFlags> for OpQueryFlags

fn bitxor_assign(&mut self, other: OpQueryFlags)

Toggles the set of flags.

impl Debug for OpQueryFlags

impl FromIterator<OpQueryFlags> for OpQueryFlags

impl Octal for OpQueryFlags

impl Binary for OpQueryFlags

impl LowerHex for OpQueryFlags

impl UpperHex for OpQueryFlags

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self