pub struct Paint {Show 13 fields
pub index: u32,
pub max: f64,
pub min: f64,
pub rarity: u32,
pub name: String,
pub collection: Option<String>,
pub image: String,
pub stattrak: Option<bool>,
pub souvenir: Option<bool>,
pub normal_prices: Vec<u64>,
pub normal_volume: Vec<u64>,
pub stattrak_prices: Option<Vec<u64>>,
pub stattrak_volume: Option<Vec<u64>>,
}Expand description
Paint/skin information with pricing data
Fields§
§index: u32§max: f64§min: f64§rarity: u32§name: String§collection: Option<String>§image: String§stattrak: Option<bool>§souvenir: Option<bool>§normal_prices: Vec<u64>Normal prices by wear condition [Factory New, Minimal Wear, Field-Tested, Well-Worn, Battle-Scarred]
normal_volume: Vec<u64>Normal volumes by wear condition [Factory New, Minimal Wear, Field-Tested, Well-Worn, Battle-Scarred]
stattrak_prices: Option<Vec<u64>>StatTrak prices by wear condition (if applicable)
stattrak_volume: Option<Vec<u64>>StatTrak volumes by wear condition (if applicable)
Implementations§
Source§impl Paint
impl Paint
Sourcepub fn price_for_wear(&self, wear: WearCondition) -> Option<u64>
pub fn price_for_wear(&self, wear: WearCondition) -> Option<u64>
Get the price for a specific wear condition (normal skin)
Sourcepub fn volume_for_wear(&self, wear: WearCondition) -> Option<u64>
pub fn volume_for_wear(&self, wear: WearCondition) -> Option<u64>
Get the volume for a specific wear condition (normal skin)
Sourcepub fn stattrak_price_for_wear(&self, wear: WearCondition) -> Option<u64>
pub fn stattrak_price_for_wear(&self, wear: WearCondition) -> Option<u64>
Get the StatTrak price for a specific wear condition
Sourcepub fn stattrak_volume_for_wear(&self, wear: WearCondition) -> Option<u64>
pub fn stattrak_volume_for_wear(&self, wear: WearCondition) -> Option<u64>
Get the StatTrak volume for a specific wear condition
Sourcepub fn has_stattrak(&self) -> bool
pub fn has_stattrak(&self) -> bool
Check if this paint has StatTrak variants
Sourcepub fn has_souvenir(&self) -> bool
pub fn has_souvenir(&self) -> bool
Check if this paint has Souvenir variants
Sourcepub fn float_range(&self) -> (f64, f64)
pub fn float_range(&self) -> (f64, f64)
Get the float range for this paint
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Paint
impl<'de> Deserialize<'de> for Paint
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Paint
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnwindSafe for Paint
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