pub struct ConflictMap {
pub files: HashMap<String, HashSet<ModId>>,
}Expand description
Maps each deployed file path to the set of mods that provide it.
Fields§
§files: HashMap<String, HashSet<ModId>>Implementations§
Source§impl ConflictMap
impl ConflictMap
Sourcepub fn register(&mut self, file_path: String, mod_id: ModId)
pub fn register(&mut self, file_path: String, mod_id: ModId)
Register that mod_id provides file_path.
Sourcepub fn conflicts(&self) -> Vec<(&str, &HashSet<ModId>)>
pub fn conflicts(&self) -> Vec<(&str, &HashSet<ModId>)>
Return all file paths that have more than one provider.
Sourcepub fn winner_for(
&self,
file_path: &str,
priority_order: &[ModId],
hidden: &HashSet<(String, String)>,
) -> Option<ModId>
pub fn winner_for( &self, file_path: &str, priority_order: &[ModId], hidden: &HashSet<(String, String)>, ) -> Option<ModId>
Determine the winner for a given file path based on mod priority order.
priority_order lists mods from lowest to highest priority.
The last mod in the list that provides the file wins.
Hidden (mod_id, rel_path) pairs are excluded.
Trait Implementations§
Source§impl Clone for ConflictMap
impl Clone for ConflictMap
Source§fn clone(&self) -> ConflictMap
fn clone(&self) -> ConflictMap
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 moreSource§impl Debug for ConflictMap
impl Debug for ConflictMap
Source§impl Default for ConflictMap
impl Default for ConflictMap
Source§fn default() -> ConflictMap
fn default() -> ConflictMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConflictMap
impl RefUnwindSafe for ConflictMap
impl Send for ConflictMap
impl Sync for ConflictMap
impl Unpin for ConflictMap
impl UnsafeUnpin for ConflictMap
impl UnwindSafe for ConflictMap
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