Module scryfall::card_searcher[][src]

This module provides an abstraction over the search parameters provided by scryfall. For a complete documentation, refer to the official site.

The main struct of this module is the SearchBuilder, this represents a search compatible with scryfall search route.

All types whose name ends in Param are parameters that can be passed to the builder.

SortMethod, SortDirection and UniqueStrategy are options that can be set on the builder.

Finally the Search trait, defines what is a valid search for scryfall it's implemented for String in case it's easier for the user to directly use a text representation.

Structs

NotParam

The negative version of a param, for example, "is:spell" becomes "-is:spell"

RarityParam

Find cards by their print rarity.

SearchBuilder

A search builder for constructing a Search for scryfall. The various parameters that can be passed to this struct are defined in this module.

Enums

BooleanParam

Parameters that are either added or are false.

ColourParam

A parameter that takes a colour as it's value.

ComparisonExpr

Some filters require a comparison expression.

FormatParam

A parameter that takes a format as it's value.

GameParam

A parameter that takes a game mode as it's value.

NumericParam

A parameter that takes a number as it's value.

SortDirection

Which direction the sorting should occur:

SortMethod

The order parameter determines how Scryfall should sort the returned cards.

StringParam

A parameter that takes a string as it's value.

TimeParam

A parameter that takes a time string as it's value.

UniqueStrategy

The unique parameter specifies if Scryfall should remove “duplicate” results in your query.

Traits

Param

Param expresses that the implementing type can be turned into a parameter in a scryfall search parameters. The valid parameters can be seen here.

Search

Search expresses that the implementing type can be turned into a query to scryfall. This means that is should be properly encoded.

Functions

not

Negates a parameter. See NotParam for the full documentation.