pub struct ArmyWriter<'a, 'b> { /* private fields */ }Expand description
Writes the forces of the factions.
Implementations§
Source§impl<'a, 'b> ArmyWriter<'a, 'b>
impl<'a, 'b> ArmyWriter<'a, 'b>
Sourcepub fn new(
inputs: &'b WorldInputs<'a>,
forces: &'b ForcePlan<'a>,
characters: &'b CharacterWriter<'a, 'b>,
residences: &'b HashMap<String, u32>,
late_recruitment: u32,
) -> Result<Self>
pub fn new( inputs: &'b WorldInputs<'a>, forces: &'b ForcePlan<'a>, characters: &'b CharacterWriter<'a, 'b>, residences: &'b HashMap<String, u32>, late_recruitment: u32, ) -> Result<Self>
Prepares the writer of the forces.
§Arguments
inputs- Tables, startpos rows and layouts.forces- Characters and forces of the world.characters- Writer of the characters.residences- Garrison residence id of each region’s settlement, by region key.late_recruitment- First recruitment manager id free after the provinces and seas, for horde armies without horde details.
§Errors
Returns an error if a table or column is missing.
Sourcepub fn write_army_array(&self, faction: &FactionEntry) -> Result<RecordNode>
pub fn write_army_array(&self, faction: &FactionEntry) -> Result<RecordNode>
Sourcepub fn write_used_legacies(&self, faction: &FactionEntry) -> Result<RecordNode>
pub fn write_used_legacies(&self, faction: &FactionEntry) -> Result<RecordNode>
Writes the legacy names and emblems a faction has used (MILITARY_FORCE_LEGACY_NAMES_AND_EMBLEMS): the drawn
names and the emblems of its armies and navies, and whether it uses override names. The rest of the record is
the game’s RNG state.
§Errors
Returns an error if a table, column or layout is missing.
Auto Trait Implementations§
impl<'a, 'b> Freeze for ArmyWriter<'a, 'b>
impl<'a, 'b> RefUnwindSafe for ArmyWriter<'a, 'b>
impl<'a, 'b> Send for ArmyWriter<'a, 'b>
impl<'a, 'b> Sync for ArmyWriter<'a, 'b>
impl<'a, 'b> Unpin for ArmyWriter<'a, 'b>
impl<'a, 'b> UnsafeUnpin for ArmyWriter<'a, 'b>
impl<'a, 'b> UnwindSafe for ArmyWriter<'a, 'b>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.