Struct eu4save::TagResolver
source · [−]pub struct TagResolver { /* private fields */ }
Expand description
Tracks tag progression throughput history
The tag resolver is important to answering questions like “where are they now?” when looking at historic events like province changes or wars. When countries tag switch the tag resolver is able to connect historic events to country’s current selves. For instance in a TYR -> IRE -> GBR game, the provinces and wars gained while playing as TYR should still be aggregated under the current GBR tag.
Implementations
sourceimpl TagResolver
impl TagResolver
pub fn create(nation_events: &[NationEvents]) -> Self
sourcepub fn resolve(&self, tag: CountryTag, date: Eu4Date) -> Option<TagData>
pub fn resolve(&self, tag: CountryTag, date: Eu4Date) -> Option<TagData>
Given a date and tag associated with the date, return the current tag where the argument is stored.
sourcepub fn initial(&self, tag: CountryTag) -> Option<TagData>
pub fn initial(&self, tag: CountryTag) -> Option<TagData>
Return where the country initial’s known as the given tag is now
sourcepub fn at(&self, date: Eu4Date) -> TagResolverDated<'_>
pub fn at(&self, date: Eu4Date) -> TagResolverDated<'_>
Create a resolver that only considers nation events priot to the given date.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TagResolver
impl Send for TagResolver
impl Sync for TagResolver
impl Unpin for TagResolver
impl UnwindSafe for TagResolver
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more