pub struct FortressUnit {
pub level: u16,
pub count: u16,
pub in_training: u16,
pub limit: u16,
pub training: FortressAction<()>,
pub upgrade_cost: FortressCost,
pub upgrade_next_lvl: u64,
}
Expand description
Information about a single type of unit
Fields§
§level: u16
The level this unit has
count: u16
The amount of this unit, that you have available for combat
in_training: u16
The amount of this unit, that are currently being trained/build
limit: u16
The maximum count + in_training
you have of this unit
training: FortressAction<()>
All information about training up new units of this type
upgrade_cost: FortressCost
The price to pay in stone for the next upgrade
upgrade_next_lvl: u64
The level this unit will be at, when you upgrade it
Trait Implementations§
Source§impl Clone for FortressUnit
impl Clone for FortressUnit
Source§fn clone(&self) -> FortressUnit
fn clone(&self) -> FortressUnit
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 FortressUnit
impl Debug for FortressUnit
Source§impl Default for FortressUnit
impl Default for FortressUnit
Source§fn default() -> FortressUnit
fn default() -> FortressUnit
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FortressUnit
impl<'de> Deserialize<'de> for FortressUnit
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 FortressUnit
impl RefUnwindSafe for FortressUnit
impl Send for FortressUnit
impl Sync for FortressUnit
impl Unpin for FortressUnit
impl UnwindSafe for FortressUnit
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