pub enum PackrinthError {
Show 36 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,
RepoIsDirtyWhileUpdating,
FailedToInitGitRepoWhileInitModpack {
error_message: String,
},
ModpackAlreadyExists {
directory: String,
},
MainModLoaderProvidedButNoVersion,
}Expand description
An error that can occur while performing Packrinth operations.
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
RepoIsDirtyWhileUpdating
FailedToInitGitRepoWhileInitModpack
ModpackAlreadyExists
MainModLoaderProvidedButNoVersion
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§
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