[][src]Struct alfred::ModifierData

pub struct ModifierData<'a> {
    pub subtitle: Option<Cow<'a, str>>,
    pub arg: Option<Cow<'a, str>>,
    pub valid: Option<bool>,
    pub icon: Option<Icon<'a>>,
    pub variables: HashMap<Cow<'a, str>, Cow<'a, str>>,
    // some fields omitted
}

Optional overrides of subtitle, arg, and valid for modifiers.

Fields

subtitle: Option<Cow<'a, str>>

The subtitle to use for the current modifier.

arg: Option<Cow<'a, str>>

The arg to use for the current modifier.

valid: Option<bool>

The validity to use for the current modifier.

icon: Option<Icon<'a>>

The result icon to use for the current modifier.

This icon is only supported when using JSON output. The legacy XML output format does not support per-modifier icons.

This icon is only used with Alfred 3.4.1 or later.

variables: HashMap<Cow<'a, str>, Cow<'a, str>>

Variables to pass out of the script filter if the item is selected in Alfred's results using this modifier.

This property is only used with JSON output and only affects Alfred 3.4.1 or later.

Methods

impl<'a> ModifierData<'a>[src]

pub fn to_json(&self) -> Value[src]

Serializes the ModifierData into its JSON representation.

impl<'a> ModifierData<'a>[src]

pub fn new() -> ModifierData<'a>[src]

Returns a new ModifierData where all fields are None.

Trait Implementations

impl<'a> PartialEq<ModifierData<'a>> for ModifierData<'a>[src]

impl<'a> Default for ModifierData<'a>[src]

impl<'a> Clone for ModifierData<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Eq for ModifierData<'a>[src]

impl<'a> Debug for ModifierData<'a>[src]

Auto Trait Implementations

impl<'a> Send for ModifierData<'a>

impl<'a> Unpin for ModifierData<'a>

impl<'a> Sync for ModifierData<'a>

impl<'a> RefUnwindSafe for ModifierData<'a>

impl<'a> UnwindSafe for ModifierData<'a>

Blanket Implementations

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

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, 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]