[−][src]Trait scryfall::card_searcher::Search
Search expresses that the implementing type can be turned into a query to
scryfall
. This means that is should be
properly encoded.
Required methods
Loading content...Implementations on Foreign Types
impl<'_, T> Search for &'_ T where
T: Search,
[src]
T: Search,
impl<'_, T> Search for &'_ mut T where
T: Search,
[src]
T: Search,
impl<'_> Search for &'_ str
[src]
fn to_query(&self) -> String
[src]
This guarantees that the query is properly encoded. Be wary that you need
to follow scryfall
syntax.
The use case of this implementation is usually this. (See Card::search
for details)
use scryfall::card::Card; assert!(Card::search("lightning") .filter_map(|x| x.ok()) .flatten() .all(|x| x.name.to_lowercase().contains("lightning")))