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,
}
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
sourceimpl LoaderMod
impl LoaderMod
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
sourceimpl<'de> Deserialize<'de> for LoaderMod
impl<'de> Deserialize<'de> for LoaderMod
sourcefn 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 RefUnwindSafe for LoaderMod
impl Send for LoaderMod
impl Sync for LoaderMod
impl Unpin for LoaderMod
impl UnwindSafe for LoaderMod
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more