[][src]Struct cr_tools::logic::types::CardEntry

pub struct CardEntry {
    pub name: String,
    pub have: usize,
    pub level: usize,
    pub card_type: CardType,
    pub rarity: Rarity,
    pub computed: Option<CardData>,
}

Fields

name: String

The name of the card

have: usize

The amount of cards in posession

level: usize

The current level of the card

card_type: CardType

The rarity of the card

rarity: Rarity

The rarity of the card

computed: Option<CardData>

Computed values

Implementations

impl CardEntry[src]

pub fn calc_remaining(&self, arena: Option<Arena>) -> Option<CardData>[src]

pub fn compute_all(list: &mut Vec<Self>)[src]

pub fn sort_remaining(a: &Self, b: &Self) -> Ordering[src]

Custom order algorithm for sorting CardEntries by days

pub fn sum_all(list: &mut Vec<Self>) -> Result<()>[src]

impl CardEntry[src]

pub fn new() -> Self[src]

impl CardEntry[src]

pub fn get_needed(&self) -> usize[src]

Calculates the amount of required cards to upgrade to the next level (or 0 when on 13)

Trait Implementations

impl Clone for CardEntry[src]

impl<'de> Deserialize<'de> for CardEntry[src]

impl PartialEq<CardEntry> for CardEntry[src]

impl Serialize for CardEntry[src]

impl StructuralPartialEq for CardEntry[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.