pub struct MrPack {
pub format_version: u16,
pub game: String,
pub version_id: String,
pub name: String,
pub summary: Option<String>,
pub files: Vec<File>,
pub dependencies: MrPackDependencies,
}Expand description
The main index file in a Modrinth modpack.
Fields§
§format_version: u16§game: String§version_id: String§name: String§summary: Option<String>§files: Vec<File>§dependencies: MrPackDependenciesImplementations§
Source§impl MrPack
impl MrPack
Sourcepub fn from_mrpack(mrpack_path: &Path) -> PackrinthResult<Self>
pub fn from_mrpack(mrpack_path: &Path) -> PackrinthResult<Self>
Creates a MrPack instance from a .mrpack file location.
§Errors
PackrinthError::FailedToInitializeFileTypewhen creating the.mrpackfile type failedPackrinthError::FailedToCreateZipArchivewhen creating the zip archive failedPackrinthError::InvalidMrPackwhen the modpack doesn’t fully adhere to the mrpack specificationsPackrinthError::FailedToReadToStringwhen reading the main config in the zip failed
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MrPack
impl<'de> Deserialize<'de> for MrPack
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
impl Eq for MrPack
impl StructuralPartialEq for MrPack
Auto Trait Implementations§
impl Freeze for MrPack
impl RefUnwindSafe for MrPack
impl Send for MrPack
impl Sync for MrPack
impl Unpin for MrPack
impl UnsafeUnpin for MrPack
impl UnwindSafe for MrPack
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.