[][src]Struct avocado::dsl::update::Modification

pub struct Modification {
    pub set: Document,
    pub unset: BTreeSet<Cow<'static, str>>,
    pub set_current_date: BTreeMap<Cow<'static, str>, DateTimeType>,
    pub rename: BTreeMap<Cow<'static, str>, Cow<'static, str>>,
    pub inc: Document,
    pub mul: Document,
    pub min: Document,
    pub max: Document,
    pub add_to_set: Document,
}

The set of possible update operators.

Fields

Replaces the value of given fields with the specified values.

Removes the specified fiels from documents. In arrays, only sets the element to null but does not remove it.

Sets the value of the given fiels to the current date.

Renames the given fields using the new name specified as the value.

Increments the specified fields by the given amount, which may be negative.

Multiplies the specified fields by the given factor.

Sets the value of each field only if the specified value is less than the already-existing value of the respective field.

Sets the value of each field only if the specified value is greater than the already-existing value of the respective field.

Adds the values to the specified array-valued fields if they do not yet contain them.

Trait Implementations

impl Default for Modification
[src]

Returns the "default value" for a type. Read more

impl PartialEq<Modification> for Modification
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<Modification> for UpdateSpec
[src]

Performs the conversion.

impl Clone for Modification
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Modification
[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Modification
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Modification
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

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

Performs the conversion.

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

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

impl<T> Same for T

Should always be Self