pub struct EnumQuery<'a> { /* private fields */ }Expand description
Query interface for MTGJSON enum/keyword data backed by cached JSON files.
Implementations§
Source§impl<'a> EnumQuery<'a>
impl<'a> EnumQuery<'a>
Sourcepub fn new(conn: &'a Connection) -> Self
pub fn new(conn: &'a Connection) -> Self
Create a new EnumQuery bound to the given connection.
Sourcepub fn keywords(&self) -> Result<Value>
pub fn keywords(&self) -> Result<Value>
Get all keyword categories.
Loads Keywords.json and returns its data payload. The resulting object
has keys like "abilityWords", "keywordAbilities", "keywordActions", each
mapping to an array of strings.
Sourcepub fn card_types(&self) -> Result<Value>
pub fn card_types(&self) -> Result<Value>
Get all card type definitions.
Loads CardTypes.json and returns its data payload. The resulting object
has keys for each card type (e.g., "creature", "instant", "land"), each
containing subTypes and superTypes arrays.
Sourcepub fn enum_values(&self) -> Result<Value>
pub fn enum_values(&self) -> Result<Value>
Get the full enum values reference.
Loads EnumValues.json and returns its data payload. Contains all valid
enum values used across the MTGJSON data model.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EnumQuery<'a>
impl<'a> !Send for EnumQuery<'a>
impl<'a> !Sync for EnumQuery<'a>
impl<'a> !UnwindSafe for EnumQuery<'a>
impl<'a> Freeze for EnumQuery<'a>
impl<'a> Unpin for EnumQuery<'a>
impl<'a> UnsafeUnpin for EnumQuery<'a>
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
Mutably borrows from an owned value. Read more