Struct notcoal::Operations

source ·
pub struct Operations {
    pub rm: Option<Value>,
    pub add: Option<Value>,
    pub run: Option<Vec<String>>,
    pub del: Option<bool>,
}
Expand description

Operations filters can apply.

Just a way to store operations, implementation may be found in Operations::apply.

Fields

rm: Option<Value>

Remove tags

add: Option<Value>

Add tags

run: Option<Vec<String>>

Run arbitrary commands

del: Option<bool>

Delete from disk and notmuch database

Implementations

Apply the operations defined in Filter::op to the supplied message regardless if matches this filter or not

Operations can fail, but if not they let you know if the message’s file was deleted and dropped from the database.

If operations have both run and del defined, the command is run before the message is deleted.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Given ptr, which was obtained from a prior call to Self::borrow(), return a value with the same nominal lifetime which is guaranteed to survive mutations to Self. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.