#[non_exhaustive]pub struct Set {Show 20 fields
pub id: Uuid,
pub code: SetCode,
pub mtgo_code: Option<String>,
pub arena_code: Option<String>,
pub tcgplayer_id: Option<u64>,
pub name: String,
pub set_type: SetType,
pub released_at: Option<NaiveDate>,
pub block_code: Option<String>,
pub block: Option<String>,
pub parent_set_code: Option<String>,
pub card_count: usize,
pub printed_size: Option<usize>,
pub digital: bool,
pub foil_only: bool,
pub nonfoil_only: bool,
pub scryfall_uri: String,
pub uri: Uri<Set>,
pub icon_svg_uri: String,
pub search_uri: Uri<List<Card>>,
}
Expand description
A Set object containing all fields that scryfall
provides.
For more details visit the official docs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: Uuid
A unique ID for this set on Scryfall that will not change.
code: SetCode
The unique three to five-letter code for this set.
mtgo_code: Option<String>
The unique code for this set on MTGO, which may differ from the regular code.
arena_code: Option<String>
The unique code for this set on Arena, which may differ from the regular code.
tcgplayer_id: Option<u64>
This set’s ID on TCGplayer’s API, also known as the groupId.
name: String
The English name of the set.
set_type: SetType
A computer-readable classification for this set.
released_at: Option<NaiveDate>
The date the set was released or the first card was printed in the set (in GMT-8 Pacific time).
block_code: Option<String>
The block code for this set, if any.
block: Option<String>
The block or group name code for this set, if any.
parent_set_code: Option<String>
The set code for the parent set, if any. promo and token sets often have a parent set.
card_count: usize
The number of cards in this set.
printed_size: Option<usize>
The denominator for the set’s printed collector numbers.
digital: bool
True if this set was only released in a video game.
foil_only: bool
True if this set contains only foil cards.
nonfoil_only: bool
True if this set contains only nonfoil cards.
scryfall_uri: String
A link to this set’s permapage on Scryfall’s website.
uri: Uri<Set>
A link to this set object on Scryfall’s API.
icon_svg_uri: String
A URI to an SVG file for this set’s icon on Scryfall’s CDN. Hotlinking this image isn’t recommended, because it may change slightly over time. You should download it and use it locally for your particular user interface needs.
search_uri: Uri<List<Card>>
A Scryfall API URI that you can request to begin paginating over the cards in this set.
Implementations§
Source§impl Set
impl Set
Sourcepub async fn code(code: &str) -> Result<Set>
pub async fn code(code: &str) -> Result<Set>
Returns a Set
with the given set code.
The code can be either the code
or the mtgo_code
for the set.
§Examples
use scryfall::set::Set;
assert_eq!(Set::code("mmq").await.unwrap().name, "Mercadian Masques")
Sourcepub async fn tcgplayer<T: Display>(code: T) -> Result<Set>
pub async fn tcgplayer<T: Display>(code: T) -> Result<Set>
Returns a Set
with the given tcgplayer_id
.
Also known as the groupId
on TCGplayer’s API.
§Examples
use scryfall::set::Set;
assert_eq!(Set::tcgplayer(1909).await.unwrap().name, "Amonkhet Invocations")
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Set
impl<'de> Deserialize<'de> for Set
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Set
Auto Trait Implementations§
impl Freeze for Set
impl RefUnwindSafe for Set
impl Send for Set
impl Sync for Set
impl Unpin for Set
impl UnwindSafe for Set
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more