pub struct LoaderMod {
pub name: String,
pub version: String,
pub description: Option<String>,
pub icon_path: Option<String>,
pub path: PathBuf,
pub enabled: bool,
}Available on crate feature
loader-mods only.Expand description
Represents a single loader mod.
Fields§
§name: StringMod name
version: StringMod version
description: Option<String>Mod description
icon_path: Option<String>Icon path relative to the archive root
path: PathBufFilepath
enabled: boolWhether the mod is enabled
Implementations§
Source§impl LoaderMod
impl LoaderMod
Sourcepub async fn remove(self) -> CobbleResult<()>
pub async fn remove(self) -> CobbleResult<()>
Removes the loader mod from disk.
Warning: This will permanently delete the file!
Sourcepub async fn enable(&mut self) -> CobbleResult<()>
pub async fn enable(&mut self) -> CobbleResult<()>
Enables the mod by removing the .disabled suffix from the file name.
Sourcepub async fn disable(&mut self) -> CobbleResult<()>
pub async fn disable(&mut self) -> CobbleResult<()>
Disables the mod by adding the .disabled suffix to the file name.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LoaderMod
impl<'de> Deserialize<'de> for LoaderMod
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LoaderMod
impl RefUnwindSafe for LoaderMod
impl Send for LoaderMod
impl Sync for LoaderMod
impl Unpin for LoaderMod
impl UnwindSafe for LoaderMod
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