#[non_exhaustive]pub enum PackrinthError {
Show 42 variants
PathIsFile {
path: String,
},
FailedToCreateDir {
dir_to_create: String,
error_message: String,
},
FailedToReadToString {
path_to_read: String,
error_message: String,
},
FailedToParseConfigJson {
config_path: String,
error_message: String,
},
FailedToParseModrinthResponseJson {
modrinth_endpoint: String,
error_message: String,
},
FailedToSerialize {
error_message: String,
},
ProjectIsNotAdded {
project: String,
},
OverrideDoesNotExist {
project: String,
branch: String,
},
NoOverridesForProject {
project: String,
},
NoExclusionsForProject {
project: String,
},
NoInclusionsForProject {
project: String,
},
ProjectAlreadyHasExclusions {
project: String,
},
ProjectAlreadyHasInclusions {
project: String,
},
FailedToWriteFile {
path_to_write_to: String,
error_message: String,
},
FailedToInitializeFileType {
file_to_create: String,
error_message: String,
},
DirectoryExpected {
path_that_should_have_been_dir: String,
},
FailedToStartZipFile {
file_to_start: String,
error_message: String,
},
FailedToWriteToZip {
to_write: String,
error_message: String,
},
FailedToGetWalkDirEntry {
error_message: String,
},
FailedToStripPath {
path: String,
},
FailedToCopyIntoBuffer,
FailedToAddZipDir {
zip_dir_path: String,
},
FailedToFinishZip,
BranchDoesNotExist {
branch: String,
error_message: String,
},
AttemptedToAddOtherModpack,
NoModrinthFilesFoundForProject {
project: String,
},
RequestFailed {
url: String,
error_message: String,
},
FailedToGetCurrentDirectory {
error_message: String,
},
InvalidPackFormat {
used_pack_format: u16,
},
NoBranchSpecified,
NoInclusionsSpecified,
NoExclusionsSpecified,
RepoIsDirty,
FailedToInitGitRepoWhileInitModpack {
error_message: String,
},
ModpackAlreadyExists {
directory: String,
},
MainModLoaderProvidedButNoVersion,
ModpackHasNoBranchesToUpdate,
FailedToCreateZipArchive {
zip_path: String,
error_message: String,
},
InvalidMrPack {
mrpack_path: String,
error_message: String,
},
FailedToExtractMrPack {
mrpack_path: String,
output_directory: String,
error_message: String,
},
BranchAlreadyExists {
branch: String,
},
FailedToRemoveDir {
dir_to_remove: String,
error_message: String,
},
}Expand description
An error that can occur while performing Packrinth operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PathIsFile
FailedToCreateDir
FailedToReadToString
FailedToParseConfigJson
FailedToParseModrinthResponseJson
FailedToSerialize
ProjectIsNotAdded
OverrideDoesNotExist
NoOverridesForProject
NoExclusionsForProject
NoInclusionsForProject
ProjectAlreadyHasExclusions
ProjectAlreadyHasInclusions
FailedToWriteFile
FailedToInitializeFileType
DirectoryExpected
FailedToStartZipFile
FailedToWriteToZip
FailedToGetWalkDirEntry
FailedToStripPath
FailedToCopyIntoBuffer
FailedToAddZipDir
FailedToFinishZip
BranchDoesNotExist
AttemptedToAddOtherModpack
NoModrinthFilesFoundForProject
RequestFailed
FailedToGetCurrentDirectory
InvalidPackFormat
NoBranchSpecified
NoInclusionsSpecified
NoExclusionsSpecified
RepoIsDirty
FailedToInitGitRepoWhileInitModpack
ModpackAlreadyExists
MainModLoaderProvidedButNoVersion
ModpackHasNoBranchesToUpdate
FailedToCreateZipArchive
InvalidMrPack
FailedToExtractMrPack
BranchAlreadyExists
FailedToRemoveDir
Implementations§
Source§impl PackrinthError
impl PackrinthError
Sourcepub fn message_and_tip(&self) -> (String, String)
pub fn message_and_tip(&self) -> (String, String)
Returns a message and tip for a PackrinthError, in the form of (message, tip).
It uses the relevant data in the enum value.
Trait Implementations§
Source§impl Debug for PackrinthError
impl Debug for PackrinthError
Source§impl PartialEq for PackrinthError
impl PartialEq for PackrinthError
impl StructuralPartialEq for PackrinthError
Auto Trait Implementations§
impl Freeze for PackrinthError
impl RefUnwindSafe for PackrinthError
impl Send for PackrinthError
impl Sync for PackrinthError
impl Unpin for PackrinthError
impl UnwindSafe for PackrinthError
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