Struct rusty_alfred::AlfredItemIcon
[−]
[src]
pub struct AlfredItemIcon { pub icon_type: Option<AlfredItemIconType>, pub path: String, }
Item icon information.
Fields
icon_type: Option<AlfredItemIconType>
The type of icon this is. Defaults to None
.
By omitting the "type", Alfred will load the file path itself, for example a png. By using "type": "fileicon", Alfred will get the icon for the specified path. Finally, by using "type": "filetype", you can get the icon of a specific file, for example "path": "public.png"
path: String
The path to the icon for this item, either absolute or relative to the workflow folder.
Methods
impl AlfredItemIcon
[src]
fn new<T>(path: T) -> Self where
T: AsRef<str>,
T: AsRef<str>,
Creates an item icon pointing to path
.
Use the builder methods for more customization.
fn icon_type(self, icon_type: AlfredItemIconType) -> Self
The type of icon this is. Defaults to None
.
By omitting the "type", Alfred will load the file path itself, for example a png. By using "type": "fileicon", Alfred will get the icon for the specified path. Finally, by using "type": "filetype", you can get the icon of a specific file, for example "path": "public.png"
fn path<T>(self, path: T) -> Self where
T: AsRef<str>,
T: AsRef<str>,
The path to the icon for this item, either absolute or relative to the workflow folder.
Trait Implementations
impl Debug for AlfredItemIcon
[src]
impl PartialEq for AlfredItemIcon
[src]
fn eq(&self, __arg_0: &AlfredItemIcon) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AlfredItemIcon) -> bool
This method tests for !=
.