Struct cobble_core::minecraft::LoaderMod
source · 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: String
Mod name
version: String
Mod version
description: Option<String>
Mod description
icon_path: Option<String>
Icon path relative to the archive root
path: PathBuf
Filepath
enabled: bool
Whether 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