[][src]Struct artifact_lib::Artifact

pub struct Artifact {
    pub card_sets: Vec<CardSet>,
    pub id_map: HashMap<u32, Card>,
    pub name_map: HashMap<String, Card>,
}

Helper struct that will store the CardSets and a couple HashMaps for fast indexing

Example Usage

let my_artifact = artifact_lib::Artifact::new();
let named_card = my_artifact.card_from_name("Storm Spirit").unwrap();
let id_card = my_artifact.card_from_id(named_card.card_id).unwrap();

let my_adc = "ADCJWkTZX05uwGDCRV4XQGy3QGLmqUBg4GQJgGLGgO7AaABR3JlZW4vQmxhY2sgRXhhbXBsZQ__";
let my_deck = my_artifact.get_deck(my_adc);

Fields

Methods

impl Artifact
[src]

Creates a new Artifact object, prepopulated with all the card sets and a couple HashMaps that help with indexing into the card sets

Takes in an ADC and returns the corresponding Deck, including Hero reference cards.

Auto Trait Implementations

impl Send for Artifact

impl Sync for Artifact

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T