Struct alfred::ItemBuilder [] [src]

pub struct ItemBuilder<'a> { /* fields omitted */ }

Helper for building Item values.

Methods

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

Returns a new ItemBuilder with the given title.

Returns the built Item.

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

Sets the title to the given value.

Sets the default subtitle to the given value.

This sets the default subtitle, used when no modifier is pressed, or when no subtitle is provided for the pressed modifier.

Sets the subtitle to the given value with the given modifier.

This sets the subtitle to use when the given modifier is pressed.

Sets the icon to an image file on disk.

The path is interpreted relative to the workflow directory.

Sets the icon to the icon for a given file on disk.

The path is interpreted relative to the workflow directory.

Sets the icon to the icon for a given file type.

The type is a UTI, such as "public.jpeg".

Sets the icon to an image file on disk for the given modifier.

The path is interpreted relative to the workflow directory.

This property is only used with JSON output. The legacy XML output does not include per-modifier icons.

This property is only used with Alfred 3.4.1 or later.

Sets the icon to the icon for a given file on disk for the given modifier.

The path is interpreted relative to the workflow directory.

This property is only used with JSON output. The legacy XML output does not include per-modifier icons.

This property is only used with Alfred 3.4.1 or later.

Sets the icon to the icon for a given file type for the given modifier.

The type is a UTI, such as "public.jpeg".

This property is only used with JSON output. The legacy XML output does not include per-modifier icons.

This property is only used with Alfred 3.4.1 or later.

Sets the uid to the given value.

Sets the arg to the given value.

Sets the arg to the given value with the given modifier.

This sets the arg to use when the given modifier is pressed.

Sets the type to the given value.

Sets valid to the given value.

Sets valid to the given value with the given modifier.

This sets the validity to use when the given modifier is pressed.

Sets the subtitle, arg, validity, and icon to use with the given modifier.

Sets autocomplete to the given value.

Sets text_copy to the given value.

Sets text_large_type to the given value.

Sets quicklook_url to the given value.

Inserts a key/value pair into the item variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Sets the item's variables to variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Inserts a key/value pair into the variables for the given modifier.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Sets the variables to variables for the given modifier.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

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

Sets the title to the given value.

Sets the default subtitle to the given value.

Unsets the default subtitle.

Sets the subtitle to the given value for the given modifier.

Unsets the subtitle for the given modifier.

This unsets the subtitle that's used when the given modifier is pressed.

Clears the subtitle for all modifiers.

This unsets both the default subtitle and the per-modifier subtitles.

Sets the icon to an image file on disk.

The path is interpreted relative to the workflow directory.

Sets the icon to the icon for a given file on disk.

The path is interpreted relative to the workflow directory.

Sets the icon to the icon for a given file type.

The type is a UTI, such as "public.jpeg".

Unsets the icon.

Sets icon to an image file on disk for the given modifier.

The path is interpreted relative to the workflow directory.

This property is only used with JSON output. The legacy XML output does not include per-modifier icons.

This property is only used with Alfred 3.4.1 or later.

Sets icon to the icon for a given file on disk for the given modifier.

The path is interpreted relative to the workflow directory.

This property is only used with JSON output. The legacy XML output does not include per-modifier icons.

This property is only used with Alfred 3.4.1 or later.

Sets icon to the icon for a given file type for the given modifier.

The type is a UTI, such as "public.jpeg".

This property is only used with JSON output. The legacy XML output does not include per-modifier icons.

This property is only used with Alfred 3.4.1 or later.

Unsets icon for the given modifier.

This unsets the result icon that's used when the given modifier is pressed.

Clears the icon for all modifiers.

This unsets both the default icon and the per-modifier icons.

Sets the uid to the given value.

Unsets the uid.

Sets the arg to the given value.

Unsets the arg.

Sets the arg to the given value for the given modifier.

Unsets the arg for the given modifier.

This unsets the arg that's used when the given modifier is pressed.

Clears the arg for all modifiers.

This unsets both the default arg and the per-modifier args.

Sets the type to the given value.

Sets valid to the given value.

Sets valid to the given value for the given modifier.

Unsets valid for the given modifier.

This unsets the validity that's used when the given modifier is pressed.

Unsets valid for all modifiers.

This resets valid back to the default and clears all per-modifier validity.

Sets autocomplete to the given value.

Unsets autocomplete.

Sets subtitle, arg, validity, and icon for the given modifier.

Unsets subtitle, arg, and validity for the given modifier.

Sets text_copy to the given value.

Unsets text_copy.

Sets text_large_type to the given value.

Unsets text_large_type.

Sets quicklook_url to the given value.

Unsets quicklook_url.

Inserts a key/value pair into the item variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Removes a key from the item variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Sets the item's variables to variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Removes all item variables.

This does not affect per-modifier variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Inserts a key/value pair into the variables for the given modifier.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Removes a key from the variables for the given modifier.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Sets the variables to variables for the given modifier.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Removes all variables for the given modifier.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Removes all item variables and all per-modifier variables.

Item variables are only used with JSON output and only affect Alfred 3.4.1 or later.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.