pub struct ExtractedTables { /* private fields */ }Expand description
The start_pos_* rows of a campaign, extracted from its startpos.
Implementations§
Source§impl ExtractedTables
impl ExtractedTables
Sourcepub fn victory_objectives(&self) -> &Vec<VictoryObjectives>
pub fn victory_objectives(&self) -> &Vec<VictoryObjectives>
Victory objectives of each faction and kind of campaign.
Source§impl ExtractedTables
impl ExtractedTables
Sourcepub fn table(&self, name: &str) -> Option<&TableRows>
pub fn table(&self, name: &str) -> Option<&TableRows>
Returns the rows of a table, by name (without the _tables suffix).
Sourcepub fn tables(&self) -> impl Iterator<Item = (&str, &TableRows)>
pub fn tables(&self) -> impl Iterator<Item = (&str, &TableRows)>
Returns the tables, by name (without the _tables suffix).
Sourcepub fn victory_objectives_script(&self) -> String
pub fn victory_objectives_script(&self) -> String
Returns the victory objectives as a victory_objectives.txt script.
Sourcepub fn to_dbs(&self, schema: &Schema) -> Result<Vec<DB>>
pub fn to_dbs(&self, schema: &Schema) -> Result<Vec<DB>>
Builds a DB file per table, with the newest definition of the schema. Columns the extraction doesn’t fill keep their default value, and columns the definition lacks are left out.
§Arguments
schema- Schema of the game.
§Errors
Returns an error if the schema has no definition for a table, or a value doesn’t fit its column’s type.
Sourcepub fn to_tables(&self, schema: &Schema) -> Result<StartposTables>
pub fn to_tables(&self, schema: &Schema) -> Result<StartposTables>
Builds a table set from the extracted rows, typed as the schema’s newest definitions (see Self::to_dbs).
§Errors
Returns an error if the schema has no definition for a table, or a value doesn’t fit its column’s type.
Trait Implementations§
Source§impl Clone for ExtractedTables
impl Clone for ExtractedTables
Source§fn clone(&self) -> ExtractedTables
fn clone(&self) -> ExtractedTables
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExtractedTables
impl Debug for ExtractedTables
Source§impl Default for ExtractedTables
impl Default for ExtractedTables
Source§fn default() -> ExtractedTables
fn default() -> ExtractedTables
Auto Trait Implementations§
impl Freeze for ExtractedTables
impl RefUnwindSafe for ExtractedTables
impl Send for ExtractedTables
impl Sync for ExtractedTables
impl Unpin for ExtractedTables
impl UnsafeUnpin for ExtractedTables
impl UnwindSafe for ExtractedTables
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
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> ⓘ
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> ⓘ
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,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.