pub struct StartposInputs<'a> {
pub world: &'a WorldInputs<'a>,
pub trade_network: &'a TradeNetwork,
pub victory_objectives: &'a [VictoryObjectives],
pub map_data: &'a ESF,
pub hlp_data: &'a ESF,
pub dynamic_resources: &'a ESF,
pub campaign: &'a str,
pub map: &'a str,
pub season_name: &'a str,
pub region_palette: &'a [[u8; 3]],
pub script_variables: Option<&'a [(String, LuaSavedValue)]>,
}Expand description
What a startpos is built from.
Fields§
§world: &'a WorldInputs<'a>Inputs of the world: tables, startpos rows, layouts and map data.
trade_network: &'a TradeNetworkTrade network of the campaign map.
victory_objectives: &'a [VictoryObjectives]Victory objectives of the campaign (its victory_objectives.txt).
map_data: &'a ESFDecoded map_data.esf of the campaign map.
hlp_data: &'a ESFDecoded hlp_data.esf of the campaign map.
dynamic_resources: &'a ESFDecoded dynamic_resources.esf of the campaign map.
campaign: &'a strCampaign key.
map: &'a strCampaign map key.
season_name: &'a strLocalised name of the season the campaign starts in.
region_palette: &'a [[u8; 3]]RGB colours of the campaign map’s region lookup image, by palette index.
script_variables: Option<&'a [(String, LuaSavedValue)]>Values the campaign’s scripts save when the game builds the startpos, in order, or None if they couldn’t run.
Trait Implementations§
Source§impl<'a> Clone for StartposInputs<'a>
impl<'a> Clone for StartposInputs<'a>
Source§fn clone(&self) -> StartposInputs<'a>
fn clone(&self) -> StartposInputs<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for StartposInputs<'a>
Auto Trait Implementations§
impl<'a> Freeze for StartposInputs<'a>
impl<'a> RefUnwindSafe for StartposInputs<'a>
impl<'a> Send for StartposInputs<'a>
impl<'a> Sync for StartposInputs<'a>
impl<'a> Unpin for StartposInputs<'a>
impl<'a> UnsafeUnpin for StartposInputs<'a>
impl<'a> UnwindSafe for StartposInputs<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.