pub struct Dependencies { /* private fields */ }Expand description
Central dependencies manager for all reference data relevant to a Pack.
This struct caches and manages all data needed for reference lookups, diagnostics, and other operations that require knowledge of vanilla game data or parent mods.
§Data Categories
The dependencies are organized into three persistence levels:
§Serialized to Disk (cached)
These fields are saved to .pak files and only regenerated when the game
files change or RPFM is updated:
vanilla_files- All files from CA’s official PackFilesvanilla_tables- Index of DB table paths by table namevanilla_locs- Set of Loc file pathsvanilla_folders- Set of folder paths for existence checksvanilla_paths- Case-insensitive path lookup mapasskit_only_db_tables- Tables only present in Assembly Kit
§Regenerated on Rebuild
These fields are rebuilt each time rebuild() is called, as they depend
on the current environment:
vanilla_loose_*- Files from the game’s/datafolder (not in packs)parent_*- Files from parent mods the current pack depends on
§Runtime Cache
Built on-demand during editing and not persisted:
local_tables_references- Cached reference data for edited tableslocalisation_data- Merged Loc data for quick lookups
Implementations§
Source§impl Dependencies
impl Dependencies
Sourcepub fn build_date(&self) -> &u64
pub fn build_date(&self) -> &u64
Date of the generation of this dependencies cache. For checking if it needs an update.
Sourcepub fn version(&self) -> &String
pub fn version(&self) -> &String
Version of the program used to generate the dependencies, so they’re properly invalidated on update.
Sourcepub fn vanilla_loose_files(&self) -> &HashMap<String, RFile>
pub fn vanilla_loose_files(&self) -> &HashMap<String, RFile>
Data to quickly load loose files as part of the dependencies.
Not serialized, regenerated on rebuild because these can frequently change.
Sourcepub fn vanilla_files(&self) -> &HashMap<String, RFile>
pub fn vanilla_files(&self) -> &HashMap<String, RFile>
Data to quickly load CA dependencies from disk.
Sourcepub fn parent_files(&self) -> &HashMap<String, RFile>
pub fn parent_files(&self) -> &HashMap<String, RFile>
Data to quickly load dependencies from parent mods from disk.
Not serialized, regenerated from parent Packs on rebuild.
Sourcepub fn vanilla_loose_tables(&self) -> &HashMap<String, Vec<String>>
pub fn vanilla_loose_tables(&self) -> &HashMap<String, Vec<String>>
List of DB tables on the CA loose files. Not really used, but just in case.
Sourcepub fn vanilla_tables(&self) -> &HashMap<String, Vec<String>>
pub fn vanilla_tables(&self) -> &HashMap<String, Vec<String>>
List of DB tables on the CA files.
Sourcepub fn parent_tables(&self) -> &HashMap<String, Vec<String>>
pub fn parent_tables(&self) -> &HashMap<String, Vec<String>>
List of DB tables on the parent files.
Not serialized, regenerated from parent Packs on rebuild.
Sourcepub fn vanilla_loose_locs(&self) -> &HashSet<String>
pub fn vanilla_loose_locs(&self) -> &HashSet<String>
List of Loc tables on the CA loose files. Not really used, but just in case.
Sourcepub fn vanilla_locs(&self) -> &HashSet<String>
pub fn vanilla_locs(&self) -> &HashSet<String>
List of Loc tables on the CA files.
Sourcepub fn parent_locs(&self) -> &HashSet<String>
pub fn parent_locs(&self) -> &HashSet<String>
List of Loc tables on the parent files.
Not serialized, regenerated from parent Packs on rebuild.
Sourcepub fn vanilla_loose_folders(&self) -> &HashSet<String>
pub fn vanilla_loose_folders(&self) -> &HashSet<String>
Data to quickly check if a path exists in the vanilla loose files.
Sourcepub fn vanilla_folders(&self) -> &HashSet<String>
pub fn vanilla_folders(&self) -> &HashSet<String>
Data to quickly check if a path exists in the vanilla files.
Sourcepub fn parent_folders(&self) -> &HashSet<String>
pub fn parent_folders(&self) -> &HashSet<String>
Data to quickly check if a path exists in the parent mod files.
Sourcepub fn vanilla_loose_paths(&self) -> &HashMap<String, Vec<String>>
pub fn vanilla_loose_paths(&self) -> &HashMap<String, Vec<String>>
List of vanilla loose paths lowercased, with their casing counterparts. To quickly find files.
Sourcepub fn vanilla_paths(&self) -> &HashMap<String, Vec<String>>
pub fn vanilla_paths(&self) -> &HashMap<String, Vec<String>>
List of vanilla paths lowercased, with their casing counterparts. To quickly find files.
Sourcepub fn parent_paths(&self) -> &HashMap<String, Vec<String>>
pub fn parent_paths(&self) -> &HashMap<String, Vec<String>>
List of parent paths lowercased, with their casing counterparts. To quickly find files.
Not serialized, regenerated from parent Packs on rebuild.
Sourcepub fn local_tables_references(
&self,
) -> &HashMap<String, HashMap<i32, TableReferences>>
pub fn local_tables_references( &self, ) -> &HashMap<String, HashMap<i32, TableReferences>>
Cached data for local tables.
This is for runtime caching, and it must not be serialized to disk.
Sourcepub fn localisation_data(&self) -> &HashMap<String, String>
pub fn localisation_data(&self) -> &HashMap<String, String>
Data from all the locs, so we can quickly search for a loc entry.
Sourcepub fn asskit_only_db_tables(&self) -> &HashMap<String, DB>
pub fn asskit_only_db_tables(&self) -> &HashMap<String, DB>
DB Files only available on the assembly kit. Usable only for references. Do not use them as the base for new tables.
Source§impl Dependencies
impl Dependencies
Sourcepub fn rebuild(
&mut self,
schema: &Option<Schema>,
parent_pack_names: &[String],
file_path: Option<&Path>,
game_info: &GameInfo,
game_path: &Path,
secondary_path: &Path,
) -> Result<()>
pub fn rebuild( &mut self, schema: &Option<Schema>, parent_pack_names: &[String], file_path: Option<&Path>, game_info: &GameInfo, game_path: &Path, secondary_path: &Path, ) -> Result<()>
This function takes care of rebuilding the whole dependencies cache to be used with a new Pack.
If a file path is passed, the dependencies cache at that path will be used, replacing the currently loaded dependencies cache. If a schema is not passed, no tables/locs will be pre-decoded. Make sure to decode them later with Dependencies::decode_tables.
Sourcepub fn generate_dependencies_cache(
schema: &Option<Schema>,
game_info: &GameInfo,
game_path: &Path,
asskit_path: &Option<PathBuf>,
ignore_game_files_in_ak: bool,
) -> Result<Self>
pub fn generate_dependencies_cache( schema: &Option<Schema>, game_info: &GameInfo, game_path: &Path, asskit_path: &Option<PathBuf>, ignore_game_files_in_ak: bool, ) -> Result<Self>
This function generates the dependencies cache for the game provided and returns it.
Sourcepub fn generate_local_db_references(
&mut self,
schema: &Schema,
packs: &BTreeMap<String, Pack>,
table_names: &[String],
)
pub fn generate_local_db_references( &mut self, schema: &Schema, packs: &BTreeMap<String, Pack>, table_names: &[String], )
This function builds the local db references data for the tables you pass to it from the Packs provided.
Table names must be provided as full names (with _tables at the end).
NOTE: This function, like many others, assumes the tables are already decoded in the Packs. If they’re not, they’ll be ignored.
Sourcepub fn generate_local_definition_references(
&mut self,
schema: &Schema,
table_name: &str,
definition: &Definition,
)
pub fn generate_local_definition_references( &mut self, schema: &Schema, table_name: &str, definition: &Definition, )
This function builds the local db references data for the table with the definition you pass to and stores it in the cache.
Sourcepub fn generate_references(
&self,
schema: &Schema,
local_table_name: &str,
definition: &Definition,
) -> HashMap<i32, TableReferences>
pub fn generate_references( &self, schema: &Schema, local_table_name: &str, definition: &Definition, ) -> HashMap<i32, TableReferences>
This function builds the local db references data for the table with the definition you pass to, and returns it.
Sourcepub fn load(file_path: &Path, schema: &Option<Schema>) -> Result<Self>
pub fn load(file_path: &Path, schema: &Option<Schema>) -> Result<Self>
This function tries to load dependencies from the path provided.
Sourcepub fn save(&mut self, file_path: &Path) -> Result<()>
pub fn save(&mut self, file_path: &Path) -> Result<()>
This function saves a dependencies cache to the provided path.
Sourcepub fn needs_updating(
&self,
game_info: &GameInfo,
game_path: &Path,
) -> Result<bool>
pub fn needs_updating( &self, game_info: &GameInfo, game_path: &Path, ) -> Result<bool>
This function is used to check if the game files used to generate the dependencies cache have changed, requiring an update.
Sourcepub fn decode_tables(&mut self, schema: &Option<Schema>)
pub fn decode_tables(&mut self, schema: &Option<Schema>)
Function to force-decode all tables/locs in the dependencies.
Many operations require them to be decoded, so if you did not decoded them on load, make sure to call this to decode them after load.
Sourcepub fn file(
&self,
file_path: &str,
include_vanilla: bool,
include_parent: bool,
case_insensitive: bool,
) -> Result<&RFile>
pub fn file( &self, file_path: &str, include_vanilla: bool, include_parent: bool, case_insensitive: bool, ) -> Result<&RFile>
This function returns a reference to a specific file from the cache, if exists.
Sourcepub fn file_mut(
&mut self,
file_path: &str,
include_vanilla: bool,
include_parent: bool,
) -> Result<&mut RFile>
pub fn file_mut( &mut self, file_path: &str, include_vanilla: bool, include_parent: bool, ) -> Result<&mut RFile>
This function returns a mutable reference to a specific file from the cache, if exists.
Sourcepub fn files_mut_by_paths(
&mut self,
paths: &HashSet<String>,
include_vanilla: bool,
include_parent: bool,
) -> HashMap<String, &mut RFile>
pub fn files_mut_by_paths( &mut self, paths: &HashSet<String>, include_vanilla: bool, include_parent: bool, ) -> HashMap<String, &mut RFile>
Batch variant of Dependencies::file_mut that returns one &mut RFile per matching path.
Sourcepub fn files_by_path(
&self,
file_paths: &[ContainerPath],
include_vanilla: bool,
include_parent: bool,
case_insensitive: bool,
) -> HashMap<String, &RFile>
pub fn files_by_path( &self, file_paths: &[ContainerPath], include_vanilla: bool, include_parent: bool, case_insensitive: bool, ) -> HashMap<String, &RFile>
This function returns a reference to all files corresponding to the provided paths.
Sourcepub fn files_by_types(
&self,
file_types: &[FileType],
include_vanilla: bool,
include_parent: bool,
) -> HashMap<String, &RFile>
pub fn files_by_types( &self, file_types: &[FileType], include_vanilla: bool, include_parent: bool, ) -> HashMap<String, &RFile>
This function returns a reference to all files of the specified FileTypes from the cache, if any, along with their path.
Sourcepub fn files_by_types_mut(
&mut self,
file_types: &[FileType],
include_vanilla: bool,
include_parent: bool,
) -> HashMap<String, &mut RFile>
pub fn files_by_types_mut( &mut self, file_types: &[FileType], include_vanilla: bool, include_parent: bool, ) -> HashMap<String, &mut RFile>
This function returns a mutable reference to all files of the specified FileTypes from the cache, if any, along with their path.
Sourcepub fn loc_data(
&self,
include_vanilla: bool,
include_parent: bool,
) -> Result<Vec<&RFile>>
pub fn loc_data( &self, include_vanilla: bool, include_parent: bool, ) -> Result<Vec<&RFile>>
This function returns the vanilla/parent locs from the cache, according to the params you pass it.
It returns them in the order the game will load them.
Sourcepub fn db_data(
&self,
table_name: &str,
include_vanilla: bool,
include_parent: bool,
) -> Result<Vec<&RFile>>
pub fn db_data( &self, table_name: &str, include_vanilla: bool, include_parent: bool, ) -> Result<Vec<&RFile>>
This function returns the vanilla/parent db tables from the cache, according to the params you pass it.
It returns them in the order the game will load them.
NOTE: table_name is expected to be the table’s folder name, with “_tables” at the end.
Sourcepub fn db_data_datacored<'a>(
&'a self,
table_name: &str,
packs: &'a BTreeMap<String, Pack>,
include_vanilla: bool,
include_parent: bool,
) -> Result<Vec<&'a RFile>>
pub fn db_data_datacored<'a>( &'a self, table_name: &str, packs: &'a BTreeMap<String, Pack>, include_vanilla: bool, include_parent: bool, ) -> Result<Vec<&'a RFile>>
This function returns the vanilla/parent db tables from the cache, according to the params you pass it, applying to them any datacore from the provided Pack.
It returns them in the order the game will load them.
NOTE: table_name is expected to be the table’s folder name, with “_tables” at the end.
Sourcepub fn db_and_loc_data(
&self,
include_db: bool,
include_loc: bool,
include_vanilla: bool,
include_parent: bool,
) -> Result<Vec<&RFile>>
pub fn db_and_loc_data( &self, include_db: bool, include_loc: bool, include_vanilla: bool, include_parent: bool, ) -> Result<Vec<&RFile>>
This function returns the vanilla/parent DB and Loc tables from the cache, according to the params you pass it.
It returns them in the order the game will load them.
Sourcepub fn db_reference_data(
&self,
schema: &Schema,
packs: &BTreeMap<String, Pack>,
table_name: &str,
definition: &Definition,
loc_data: &Option<HashMap<Cow<'_, str>, Cow<'_, str>>>,
) -> HashMap<i32, TableReferences>
pub fn db_reference_data( &self, schema: &Schema, packs: &BTreeMap<String, Pack>, table_name: &str, definition: &Definition, loc_data: &Option<HashMap<Cow<'_, str>, Cow<'_, str>>>, ) -> HashMap<i32, TableReferences>
This function returns the reference/lookup data of all relevant columns of a DB Table.
NOTE: This assumes you’ve populated the runtime references before this. If not, it’ll fail.
Sourcepub fn loc_key_source(&self, key: &str) -> Option<(String, String, Vec<String>)>
pub fn loc_key_source(&self, key: &str) -> Option<(String, String, Vec<String>)>
This function returns the table/column/key from the provided loc key.
We return the table without “_tables”. Keep that in mind if you use this.
Sourcepub fn file_exists(
&self,
file_path: &str,
include_vanilla: bool,
include_parent: bool,
case_insensitive: bool,
) -> bool
pub fn file_exists( &self, file_path: &str, include_vanilla: bool, include_parent: bool, case_insensitive: bool, ) -> bool
This function returns if a specific file exists in the dependencies cache.
Sourcepub fn folder_exists(
&self,
folder_path: &str,
include_vanilla: bool,
include_parent: bool,
case_insensitive: bool,
) -> bool
pub fn folder_exists( &self, folder_path: &str, include_vanilla: bool, include_parent: bool, case_insensitive: bool, ) -> bool
This function returns if a specific folder exists in the dependencies cache.
Sourcepub fn are_dependencies_generated(file_path: &Path) -> bool
pub fn are_dependencies_generated(file_path: &Path) -> bool
This function checks if the dependencies cache file exists on disk.
Sourcepub fn is_vanilla_data_loaded(&self, include_asskit: bool) -> bool
pub fn is_vanilla_data_loaded(&self, include_asskit: bool) -> bool
This function checks if there is vanilla data loaded in the provided cache.
Sourcepub fn is_asskit_data_loaded(&self) -> bool
pub fn is_asskit_data_loaded(&self) -> bool
This function checks if there is assembly kit data loaded in the provided cache.
Sourcepub fn is_db_outdated(&self, rfile: &RFileDecoded) -> bool
pub fn is_db_outdated(&self, rfile: &RFileDecoded) -> bool
This function is used to check if a table is outdated or not.
Sourcepub fn db_version(&self, table_name: &str) -> Option<i32>
pub fn db_version(&self, table_name: &str) -> Option<i32>
This function is used to get the version of a table in the game files, if said table is in the game files.
Sourcepub fn db_values_from_table_name_and_column_name(
&self,
packs: Option<&BTreeMap<String, Pack>>,
table_name: &str,
column_name: &str,
include_vanilla: bool,
include_parent: bool,
) -> HashSet<String>
pub fn db_values_from_table_name_and_column_name( &self, packs: Option<&BTreeMap<String, Pack>>, table_name: &str, column_name: &str, include_vanilla: bool, include_parent: bool, ) -> HashSet<String>
This function returns the list of values a column of a table has, across all instances of said table in the dependencies and the provided Packs.
Sourcepub fn db_values_from_table_name_and_column_name_for_value(
&self,
packs: Option<&BTreeMap<String, Pack>>,
table_name: &str,
key_column_name: &str,
desired_column_name: &str,
include_vanilla: bool,
include_parent: bool,
) -> HashMap<String, String>
pub fn db_values_from_table_name_and_column_name_for_value( &self, packs: Option<&BTreeMap<String, Pack>>, table_name: &str, key_column_name: &str, desired_column_name: &str, include_vanilla: bool, include_parent: bool, ) -> HashMap<String, String>
This function returns the value a table has in the row it has a specific value in a specific column.
Sourcepub fn update_db(
&mut self,
rfile: &mut RFileDecoded,
) -> Result<(i32, i32, Vec<String>, Vec<String>)>
pub fn update_db( &mut self, rfile: &mut RFileDecoded, ) -> Result<(i32, i32, Vec<String>, Vec<String>)>
This function updates a DB Table to its latest valid version, being the latest valid version the one in the vanilla files.
It returns both, old and new versions, or an error.
Sourcepub fn generate_missing_loc_data(
&self,
packs: &mut BTreeMap<String, Pack>,
) -> Result<Vec<ContainerPath>>
pub fn generate_missing_loc_data( &self, packs: &mut BTreeMap<String, Pack>, ) -> Result<Vec<ContainerPath>>
Function to generate the missing loc entries in a pack.
Sourcepub fn bruteforce_loc_key_order(
&self,
schema: &mut Schema,
locs: Option<HashMap<String, Vec<String>>>,
local_packs: Option<&BTreeMap<String, Pack>>,
ak_files: Option<&mut HashMap<String, DB>>,
) -> Result<()>
pub fn bruteforce_loc_key_order( &self, schema: &mut Schema, locs: Option<HashMap<String, Vec<String>>>, local_packs: Option<&BTreeMap<String, Pack>>, ak_files: Option<&mut HashMap<String, DB>>, ) -> Result<()>
This function bruteforces the order in which multikeyed tables get their keys together for loc entries.
Sourcepub fn generate_automatic_patches(
&self,
schema: &mut Schema,
packs: &BTreeMap<String, Pack>,
) -> Result<()>
pub fn generate_automatic_patches( &self, schema: &mut Schema, packs: &BTreeMap<String, Pack>, ) -> Result<()>
This function generates automatic schema patches based mainly on bruteforcing and some clever logic.
Sourcepub fn add_tile_maps_and_tiles(
&mut self,
packs: &mut BTreeMap<String, Pack>,
pack_key: Option<&str>,
game: &GameInfo,
schema: &Schema,
options: OptimizerOptions,
tile_maps: Vec<PathBuf>,
tiles: Vec<(PathBuf, String)>,
) -> Result<(Vec<ContainerPath>, Vec<ContainerPath>)>
pub fn add_tile_maps_and_tiles( &mut self, packs: &mut BTreeMap<String, Pack>, pack_key: Option<&str>, game: &GameInfo, schema: &Schema, options: OptimizerOptions, tile_maps: Vec<PathBuf>, tiles: Vec<(PathBuf, String)>, ) -> Result<(Vec<ContainerPath>, Vec<ContainerPath>)>
Function to add tiles and tile maps to the provided pack.
Only for Warhammer 3.
pub fn build_starpos_pre( &self, packs: &mut BTreeMap<String, Pack>, pack_key: Option<&str>, game: &GameInfo, game_path: &Path, campaign_id: &str, process_hlp_spd_data: bool, sub_start_pos: &str, ) -> Result<()>
Sourcepub fn build_starpos_post(
&self,
packs: &mut BTreeMap<String, Pack>,
pack_key: Option<&str>,
game: &GameInfo,
game_path: &Path,
asskit_path: Option<PathBuf>,
campaign_id: &str,
process_hlp_spd_data: bool,
cleanup_mode: bool,
sub_start_pos: &[String],
) -> Result<Vec<ContainerPath>>
pub fn build_starpos_post( &self, packs: &mut BTreeMap<String, Pack>, pack_key: Option<&str>, game: &GameInfo, game_path: &Path, asskit_path: Option<PathBuf>, campaign_id: &str, process_hlp_spd_data: bool, cleanup_mode: bool, sub_start_pos: &[String], ) -> Result<Vec<ContainerPath>>
Function to trigger the second part of the startpos build process, which involves importing the startpos file into the provided pack.
Call this when the game closes after the pre function launched it.
NOTE: The assembly kit path is only needed for Rome 2.
Sourcepub fn import_from_ak(&self, table_name: &str, schema: &Schema) -> Result<DB>
pub fn import_from_ak(&self, table_name: &str, schema: &Schema) -> Result<DB>
This function imports a specific table from the data it has in the AK.
Tables generated with this are VALID.
Sourcepub fn insert_loc_as_vanilla_loc(&mut self, rfile: RFile)
pub fn insert_loc_as_vanilla_loc(&mut self, rfile: RFile)
This function manually inserts a loc file from this into the dependencies as a vanilla loc.
THIS IS DANGEROUS. DO NOT USE IT UNLESS YOU KNOW WHAT YOU’RE DOING.
Sourcepub fn add_recursive_lookups_to_definition(
&self,
schema: &Schema,
definition: &mut Definition,
table_name: &str,
)
pub fn add_recursive_lookups_to_definition( &self, schema: &Schema, definition: &mut Definition, table_name: &str, )
This function manipulates a definition to recursively add reference lookups if found.
THIS IS DANGEROUS IF WE FIND A CYCLIC DEPENDENCY.
Trait Implementations§
Source§impl Clone for Dependencies
impl Clone for Dependencies
Source§fn clone(&self) -> Dependencies
fn clone(&self) -> Dependencies
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Dependencies
impl Debug for Dependencies
Source§impl Default for Dependencies
impl Default for Dependencies
Source§fn default() -> Dependencies
fn default() -> Dependencies
Source§impl<'de> Deserialize<'de> for Dependencies
impl<'de> Deserialize<'de> for Dependencies
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>,
Auto Trait Implementations§
impl Freeze for Dependencies
impl RefUnwindSafe for Dependencies
impl Send for Dependencies
impl Sync for Dependencies
impl Unpin for Dependencies
impl UnsafeUnpin for Dependencies
impl UnwindSafe for Dependencies
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.