pub struct Faction {Show 14 fields
pub id: FactionId,
pub name: String,
pub treasury: FactionTreasury,
pub tax_policy: TaxPolicy,
pub trade_route_ids: Vec<TradeRouteId>,
pub embargoes: Vec<EmbargoPenalty>,
pub reparations_paying: Vec<WarReparations>,
pub reparations_receiving: Vec<WarReparations>,
pub tribute_paying: Vec<TributeAgreementId>,
pub tribute_receiving: Vec<TributeAgreementId>,
pub espionage_ops: Vec<EspionageOperationId>,
pub disinformation_penalty: f64,
pub gdp_proxy: f64,
pub at_war_with: Vec<FactionId>,
}Expand description
Full descriptor for a single faction in the economy.
Fields§
§id: FactionId§name: String§treasury: FactionTreasury§tax_policy: TaxPolicy§trade_route_ids: Vec<TradeRouteId>IDs of trade routes this faction participates in.
embargoes: Vec<EmbargoPenalty>Factions this faction has imposed embargoes on.
reparations_paying: Vec<WarReparations>Active reparations this faction must pay.
reparations_receiving: Vec<WarReparations>Reparations this faction is receiving.
tribute_paying: Vec<TributeAgreementId>Tribute agreements where this faction pays.
tribute_receiving: Vec<TributeAgreementId>Tribute agreements where this faction receives.
espionage_ops: Vec<EspionageOperationId>Ongoing espionage operations this faction launched.
disinformation_penalty: f64Disinformation penalty to outgoing trade routes (fraction of volume lost).
gdp_proxy: f64Cumulative GDP proxy (sum of all trade route volumes over lifetime).
at_war_with: Vec<FactionId>Whether this faction is at war with any others.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Faction
impl RefUnwindSafe for Faction
impl Send for Faction
impl Sync for Faction
impl Unpin for Faction
impl UnsafeUnpin for Faction
impl UnwindSafe for Faction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.