[−][src]Struct sulis_state::MerchantState
Fields
id: String
buy_frac: f32
sell_frac: f32
listeners: ChangeListenerList<MerchantState>
loot_list_id: Option<String>
refresh_rate_millis: usize
last_refresh_millis: usize
Implementations
impl MerchantState
[src]
pub fn load(save: MerchantSaveState) -> Result<MerchantState, Error>
[src]
pub fn new(
id: &str,
loot_list: &Rc<LootList>,
buy_frac: f32,
sell_frac: f32,
refresh_time: Time
) -> MerchantState
[src]
id: &str,
loot_list: &Rc<LootList>,
buy_frac: f32,
sell_frac: f32,
refresh_time: Time
) -> MerchantState
pub fn check_refresh(&mut self)
[src]
pub fn get_buy_price(&self, item_state: &ItemState) -> i32
[src]
pub fn get_sell_price(&self, item_state: &ItemState) -> i32
[src]
pub fn add(&mut self, item_state: ItemState)
[src]
pub fn remove(&mut self, index: usize) -> Option<ItemState>
[src]
removes one copy of the item at the specified index
pub fn items(&self) -> &ItemList
[src]
Auto Trait Implementations
impl !RefUnwindSafe for MerchantState
impl !Send for MerchantState
impl !Sync for MerchantState
impl Unpin for MerchantState
impl !UnwindSafe for MerchantState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,