Trait scryfall::search::param::value::FormatValue

source ·
pub trait FormatValue: ParamValue { }
Expand description

A value representing a constructed format, such as Standard or Commander.

Parameters with a FormatValue argument include [format()], banned(), and restricted().

This trait is implemented for String and &str, as well as the Format enum.

use scryfall::format::Format;
// Find a card that's restricted in Vintage whose name contains 'recall'.
let card = restricted(Format::Vintage)
    .and(name("recall"))
    .search_all()
    .await?
    .into_iter()
    .next()
    .unwrap();
assert_eq!(card.name, "Ancestral Recall");

Implementors§