pub struct Unit {
pub kind: UnitKind,
pub id: u64,
pub country: Option<Tag>,
pub location: Option<i32>,
pub mission: Mission,
pub subunits: u32,
pub strength: Milli,
pub leader: Option<u64>,
}Expand description
A unit: an army or a navy.
Fields§
§kind: UnitKindArmy or navy.
id: u64The game’s id: the same while the unit exists.
country: Option<Tag>The country it belongs to.
location: Option<i32>The province it is in or at; None for none.
mission: MissionWhat it does on its own.
subunits: u32Regiments or ships.
strength: MilliThe sum of the regiments’ or ships’ strength (men for an army).
leader: Option<u64>Its leader’s id; None for no leader.
Trait Implementations§
impl Copy for Unit
impl Eq for Unit
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Forget for Unit
impl Freeze for Unit
impl Move for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnsafeUnpin for Unit
impl UnwindSafe for Unit
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