[−][src]Struct scryfall::ruling::Ruling
A ruling object.
For documentation on it's fields refer to the ruling object on the official site.
Fields
oracle_id: Uuid
source: Source
published_at: NaiveDate
comment: String
Methods
impl Ruling
[src]
ⓘImportant traits for PaginatedURI<T>pub fn multiverse_id(id: usize) -> PaginatedURI<Self>
[src]
Returns a List of rulings for a card with the given Multiverse ID. If the card has multiple multiverse IDs, this method can find either of them.
Examples
use scryfall::ruling::Ruling; match Ruling::multiverse_id(3255).next() { Some(rulings) => assert_eq!( rulings .unwrap() .iter() .filter(|r| r.comment == "The ability is a mana ability, so it is activated and resolves as a mana ability, but it can only be activated at times when you can cast an instant. Yes, this is a bit weird.") .count(), 1 ), None => panic!("Nothing") }
ⓘImportant traits for PaginatedURI<T>pub fn mtgo_id(id: usize) -> PaginatedURI<Self>
[src]
Returns rulings for a card with the given MTGO ID (also known as the Catalog ID). The ID
can either be the card’s mtgo_id
or its mtgo_foil_id
.
Examples
use scryfall::ruling::Ruling; match Ruling::mtgo_id(57934).next() { Some(rulings) => assert_eq!( rulings .unwrap() .iter() .filter(|r| r.comment == "Yes, if the fourth mode is the only one remaining, you must choose it. You read the whole contract, right?") .count(), 1 ), None => panic!(), }
ⓘImportant traits for PaginatedURI<T>pub fn arena_id(id: usize) -> PaginatedURI<Self>
[src]
Returns rulings for a card with the given Magic: The Gathering Arena ID.
use scryfall::ruling::Ruling; match Ruling::arena_id(67462).next() { Some(rulings) => assert_eq!( rulings .unwrap() .iter() .filter(|r| r.comment == "Once a chapter ability has triggered, the ability on the stack won’t be affected if the Saga gains or loses counters, or if it leaves the battlefield.") .count(), 1 ), None => panic!(), }
ⓘImportant traits for PaginatedURI<T>pub fn set_and_number(set: &str, number: u32) -> PaginatedURI<Self>
[src]
Returns a List of rulings for the card with the given set code and collector number.
Examples
use scryfall::ruling::Ruling; match Ruling::set_and_number("ima", 65).next() { Some(rulings) => assert_eq!( rulings .unwrap() .iter() .filter(|r| r.comment == "If the target spell is an illegal target when Mana Drain tries to resolve, it won’t resolve and none of its effects will happen. You won’t get any mana.") .count(), 1 ), None => panic!(), }
ⓘImportant traits for PaginatedURI<T>pub fn uuid(id: Uuid) -> PaginatedURI<Self>
[src]
Returns a List of rulings for a card with the given Scryfall ID.
Examples
use scryfall::ruling::Ruling; match Ruling::uuid("f2b9983e-20d4-4d12-9e2c-ec6d9a345787".to_string()).next() { Some(rulings) => assert_eq!( rulings .unwrap() .iter() .filter(|r| r.comment == "It must flip like a coin and not like a Frisbee.") .count(), 1 ), None => panic!(), }
Trait Implementations
impl Clone for Ruling
[src]
fn clone(&self) -> Ruling
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Ruling
[src]
fn cmp(&self, other: &Ruling) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<Ruling> for Ruling
[src]
fn partial_cmp(&self, other: &Ruling) -> Option<Ordering>
[src]
fn lt(&self, other: &Ruling) -> bool
[src]
fn le(&self, other: &Ruling) -> bool
[src]
fn gt(&self, other: &Ruling) -> bool
[src]
fn ge(&self, other: &Ruling) -> bool
[src]
impl PartialEq<Ruling> for Ruling
[src]
impl Eq for Ruling
[src]
impl Debug for Ruling
[src]
impl Hash for Ruling
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Serialize for Ruling
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Ruling
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Unpin for Ruling
impl Sync for Ruling
impl Send for Ruling
impl UnwindSafe for Ruling
impl RefUnwindSafe for Ruling
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,