pub struct ContentPolicy {
pub save_breaking_ext: &'static [&'static str],
pub cosmetic_ext: &'static [&'static str],
pub save_breaking_dirs: &'static [&'static str],
pub categories: &'static [(&'static str, ContentCategory)],
}Expand description
Extension and directory rules used to classify installed mod content.
Fields§
§save_breaking_ext: &'static [&'static str]§cosmetic_ext: &'static [&'static str]§save_breaking_dirs: &'static [&'static str]§categories: &'static [(&'static str, ContentCategory)]Implementations§
Source§impl ContentPolicy
impl ContentPolicy
Sourcepub fn classify_extension(self, ext: &str) -> ContentCategory
pub fn classify_extension(self, ext: &str) -> ContentCategory
Map a file extension (lowercase, no dot) to its ContentCategory.
Sourcepub fn classify_mod(self, mod_dir: &Path) -> ModSafety
pub fn classify_mod(self, mod_dir: &Path) -> ModSafety
Walk a mod directory and classify it as save-breaking, save-safe, or unknown.
Trait Implementations§
Source§impl Clone for ContentPolicy
impl Clone for ContentPolicy
Source§fn clone(&self) -> ContentPolicy
fn clone(&self) -> ContentPolicy
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 ContentPolicy
impl Debug for ContentPolicy
impl Copy for ContentPolicy
Auto Trait Implementations§
impl Freeze for ContentPolicy
impl RefUnwindSafe for ContentPolicy
impl Send for ContentPolicy
impl Sync for ContentPolicy
impl Unpin for ContentPolicy
impl UnsafeUnpin for ContentPolicy
impl UnwindSafe for ContentPolicy
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