pub struct TableReferences { /* private fields */ }Expand description
Reference data for a single column in a DB table.
When a column has a foreign key reference to another table (or lookup data for display purposes), this struct holds the valid values and their human-readable representations.
§Example
For a column referencing main_units_tables.key:
datawould contain entries like("wh_main_emp_inf_swordsmen", "Empire Swordsmen")- The key is the actual value stored in the DB
- The value is the lookup/display text (if available)
Implementations§
Source§impl TableReferences
impl TableReferences
Sourcepub fn field_name(&self) -> &String
pub fn field_name(&self) -> &String
Name of the column these references are for.
This is primarily for debugging purposes. Do not rely on it for programmatic column identification.
Sourcepub fn referenced_table_is_ak_only(&self) -> &bool
pub fn referenced_table_is_ak_only(&self) -> &bool
Whether the referenced table exists only in the Assembly Kit.
When true, the reference data comes from Assembly Kit tables rather
than game files. This is useful for diagnostics to identify references
to tables that may not be fully supported.
Sourcepub fn referenced_column_is_localised(&self) -> &bool
pub fn referenced_column_is_localised(&self) -> &bool
Whether the referenced column has been localised.
Some columns that originally contained text are moved to Loc files when exported from the Assembly Kit (Dave). This flag indicates that the lookup values should be fetched from localisation data.
Source§impl TableReferences
impl TableReferences
Sourcepub fn field_name_mut(&mut self) -> &mut String
pub fn field_name_mut(&mut self) -> &mut String
Name of the column these references are for.
This is primarily for debugging purposes. Do not rely on it for programmatic column identification.
Sourcepub fn referenced_table_is_ak_only_mut(&mut self) -> &mut bool
pub fn referenced_table_is_ak_only_mut(&mut self) -> &mut bool
Whether the referenced table exists only in the Assembly Kit.
When true, the reference data comes from Assembly Kit tables rather
than game files. This is useful for diagnostics to identify references
to tables that may not be fully supported.
Sourcepub fn referenced_column_is_localised_mut(&mut self) -> &mut bool
pub fn referenced_column_is_localised_mut(&mut self) -> &mut bool
Whether the referenced column has been localised.
Some columns that originally contained text are moved to Loc files when exported from the Assembly Kit (Dave). This flag indicates that the lookup values should be fetched from localisation data.
Trait Implementations§
Source§impl Clone for TableReferences
impl Clone for TableReferences
Source§fn clone(&self) -> TableReferences
fn clone(&self) -> TableReferences
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TableReferences
impl Debug for TableReferences
Source§impl Default for TableReferences
impl Default for TableReferences
Source§fn default() -> TableReferences
fn default() -> TableReferences
Source§impl<'de> Deserialize<'de> for TableReferences
impl<'de> Deserialize<'de> for TableReferences
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TableReferences
impl PartialEq for TableReferences
Source§impl Serialize for TableReferences
impl Serialize for TableReferences
impl Eq for TableReferences
impl StructuralPartialEq for TableReferences
Auto Trait Implementations§
impl Freeze for TableReferences
impl RefUnwindSafe for TableReferences
impl Send for TableReferences
impl Sync for TableReferences
impl Unpin for TableReferences
impl UnsafeUnpin for TableReferences
impl UnwindSafe for TableReferences
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more§impl<T> Pointable for T
impl<T> Pointable for T
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.