Struct rusty_alfred::AlfredItems
[−]
[src]
pub struct AlfredItems { pub items: Vec<AlfredItem>, }
The parent for all Alfred items. This is what should be printed to stdout
via to_json()
for
Alfred to display results.
Fields
items: Vec<AlfredItem>
The items to be displayed in Alfred.
Methods
impl AlfredItems
[src]
fn new() -> Self
Makes an empty items container.
fn item(self, item: AlfredItem) -> Self
Adds an item to this container. This retains the order of items, but Alfred may not display
them in that order if the items have uid
s.
fn to_json(&self) -> Result<String>
Attempts to use serde to convert this container to JSON. The resulting JSON is ready to be given to Alfred.
Trait Implementations
impl Debug for AlfredItems
[src]
impl PartialEq for AlfredItems
[src]
fn eq(&self, __arg_0: &AlfredItems) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AlfredItems) -> bool
This method tests for !=
.
impl Hash for AlfredItems
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more