pub struct ShopDefinition {
pub id: String,
pub name: String,
pub items: Vec<ShopItem>,
pub inventory: Vec<ShopItem>,
pub buy_rate: f32,
pub sell_rate: f32,
pub gold: i64,
pub restocks: bool,
pub accepts_tags: Vec<String>,
}Expand description
A shop definition within an economy file.
Fields§
§id: String§name: String§items: Vec<ShopItem>§inventory: Vec<ShopItem>§buy_rate: f32§sell_rate: f32§gold: i64§restocks: boolTrait Implementations§
Source§impl Clone for ShopDefinition
impl Clone for ShopDefinition
Source§fn clone(&self) -> ShopDefinition
fn clone(&self) -> ShopDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShopDefinition
impl Debug for ShopDefinition
Source§impl<'de> Deserialize<'de> for ShopDefinition
impl<'de> Deserialize<'de> for ShopDefinition
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 ShopDefinition
impl RefUnwindSafe for ShopDefinition
impl Send for ShopDefinition
impl Sync for ShopDefinition
impl Unpin for ShopDefinition
impl UnsafeUnpin for ShopDefinition
impl UnwindSafe for ShopDefinition
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